Is there a way to dynamically execute code contained in a string using .net 2.0, in a similar way to eval() in javascript or using sp_executeSQL in tsql?
I have a st
I just ran across something the other day which does just this in another .NET language: http://reverseblade.blogspot.com/2009/02/dont-wait-for-c-5-use-nemerle.html
I would imagine you could write your string-processing code in nemerle, compile, and reference from your C# or VB app.
I would still favor an extensible design like casperOne suggests. By doing dynamic scripting, you'll just be pushing compilation into the app and deployment into whatever process gets the programming strings to the app. But it sounds like you have your reasons, so the only other thing I'd consider here is security. Ideally, you want to limit the user as much as possible to just manipulating strings, in which case List-of-Regex seems like a pretty good option.