string local_pattern = @"[^0-9]";
System.Text.RegularExpressions.Regex local_RegEx = new
System.Text.RegularExpressions.Regex(local_pattern);
return local_RegEx.Replace(local_InputString, "");
You can invoke the C# compiler to create a class with a static method, then
call the method. Doing this without memory leaks is not easy and very bad
performance.
I would look into JScript.NET which has an eval function.
JavaScript has a nice eval function that can be utilized from C#.
See http://www.vajhoej.dk/arne/eksperten/div_2007_08/evaljs.cs for
a code example.
Arne