As talkingcars said, or if you have the old one off the car, take it to a Thread and Pipe company.
Had to do that with my new s/s front brake pipes, new ones were miles too long, our local shop, chopped the pipes and fitted new ends, Cost £35 but the car was up in the air at a garage, only took 1/4 hour.
Plus you get a new pipe and fittings, s/h ones are s/h!!!!!!!!!!!!!!!!