I'm writing an app in C# which allows the user to perform database queries based on file names.
I'm using the Regex.Replace(string, MatchEvaluator)
overload to perform replacements, because I want the user to be able to have replacement strings like SELECT * FROM table WHERE record_id = trim($1)
even though the DB we're using doesn't support functions like trim().
What I don't want is to do a series of replacements where if the value of $1 contains "$2", both replacements occur. How do I perform several string replacements in one go? I know PHP's str_replace supports arrays as arguments; is there a similar function for C#?