It usually costs from $50.00 to $100.00 per foot to dig up and replace a sewer line and then if you have to have the street or alley dug up to make a new connection to the sewer line there then the cost would go up.
Some people online have reported they've paid from $4,500.00 to $13,000.00
But most times it costs under $5,000.00 to have a sewer line professionally replaced.
I've rented a backhoe before and replaced a sewer line myself for $150.00 for the pipe and then $200.00 for backhoe rental.
I didn't need to replace the connection in the street though otherwise the cost would've been higher since I would've needed the city to replace that portion.