What is the PHP preg_replace in C#?
I have an array of string that I would like to replace by an other array of string. Here is an example in PHP. How can I do something like that in C# without using .Replace(‘old’,’new’).
$patterns[0] = '/=C0/'; $patterns[1] = '/=E9/'; $patterns[2] = '/=C9/'; $replacements[0] = 'à'; $replacements[1] = 'é'; $replacements[2] = 'é'; return preg_replace($patterns, $replacements, $text);
Here is what I will use. Some code of Jonathan Holland but not in C#3.5 but in C#2.0 🙂
Thx all.