Is there a Windows utility that will let me do multiple programmatic find/replaces on text that I cu

Posted by billmaya on Stack Overflow See other posts from Stack Overflow or by billmaya
Published on 2010-06-15T21:13:16Z Indexed on 2010/06/15 21:22 UTC
Read the original article Hit count: 191

I've inherited some C# code that contains about a thousand lines of source that I need to modify, transforming it from this:

newDataRow["to_dir"] = comboBox108.Text;

To this:

assetAttributes.Add("to_dir", comboBox108.Text);

The lines occur in various places throughout the application in groups of 40 or 50. Modifying each line by hand in Visual Studio 2008 can be done but it's labor intensive and prone to errors.

Is there a Windows utility out there that will let me cut and paste groups of code into it and then run some sort of reg-ex expression to transform the individual lines one-by-one? I'd also be willing to use some sort of VS 2008 add-in that performed the same set of reg-ex operations against a selection of code.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio