Going to depend on which line(s) need replacing, front are not that long so easier to do. Rears run from front to rear and across the axle so are that much longer and shaped to route there way to each wheel arch. It also depends on what pipe is used either copper or kunifer l pipe. My 2.5 had two rubber hoses with a centre metal pipe joining them at each of the rear wheels, I did away with these and fitted a pair of stainless braided pipes instead, some others have a single braided pipe made up for each side. The fixed metal pipes seem to get the worst corrossion in the left hand wheel arch where the pipes emerge into the arch from the centre plastic cover running from front to rear under the car. Mine cleaned up ok here and were treated to a fresh coat of metal paint.
Full set Front and Rear Strainless hoses I used here https://www.ebay.co.uk/itm/273791116445?fits=Car+Make%3ABMW%7CModel%3AZ4&epid=10022237238&hash=item3fbf38e49d:g:xMAAAOxyVLNSwuEt