How to replace the first occurrence of a regular expression in Python?

Viewed 38054

I want to replace just the first occurrence of a regular expression in a string. Is there a convenient way to do this?

2 Answers
Related