If the flexible pipe has a compression fitting on both ends (look like nuts) then a replacement can be purchased from DIY store or local plumber's merchants, you'll need PTFE tape to wrap around the threads and a a couple of good wrenches.
Trap
January 2009