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?
More Related Contents:
- Matching numbers with regular expressions — only digits and commas
- Can I use a Regex in an XPath expression?
- .NET – How can you split a “caps” delimited string into an array?
- How does RegexOptions.Compiled work?
- RegEx: Smallest possible match or nongreedy match
- Regex.IsMatch vs string.Contains
- Balancing groups in variable-length lookbehind [duplicate]
- Regular expression, split string by capital letter but ignore TLA
- Make regular expression case insensitive in ASP.NET RegularExpressionValidator
- Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators?
- Regex for string not containing multiple specific words
- Best HashTag Regex
- Regular expression for parsing links from a webpage?
- Regex replacement capture followed by digit
- Regex to match anything but two words
- Regular expression to find all table names in a query
- Regex for all PRINTABLE characters
- How to read embedded resource text file
- Where Is Machine.Config?
- Open Source Alternatives to Reflector? [closed]
- Any decent text diff/merge engine for .NET? [closed]
- Disable SSL fallback and use only TLS for outbound connections in .NET? (Poodle mitigation)
- Logging, Aspect Oriented Programming, and Dependency Injection – Trying to make sense of it all
- Get Database Table Name from Entity Framework MetaData
- How do I set a number of retry attempts in RabbitMQ?
- How to troubleshoot and debug Visual Studio design mode errors?
- How to get Windows native look for the .NET TreeView?
- .NET core 3.0 and MS Office Interop
- Windows SDK 7.1 Setup failure
- Is “Code Access Security” of any real world use?