How to Regex search/replace only first occurrence in a string in .NET?

From MSDN:

Replace(String, String, Int32)   

Within a specified input string, replaces a specified maximum number of strings that
match a regular expression pattern with a specified replacement string.

Isn’t this what you want?

Leave a Comment