Find/Replace using Regular Expressions in Visual Studio

2009-01-16


Some links for help :

1: Microsoft site; 2: Microsoft forum about Regular Expressions in VS Studio; 3: An article ; 4: Test Your Regular Expression online using .NET Engine;

My Examples:

1: Find: gex.CustomInfo.Add({["a-zA-Z0-9_]}{:Po[:Zs]}{[a-zA-Z0-9_]*}) Replace: gex.CustomInfo.Add(\1\2\3.ToString())

gex.CustomInfo.Add("MuniName", MuniName) -> gex.CustomInfo.Add("MuniName", MuniName.ToString())

2: Find: Rows({["a-zA-Z0-9_]}).Item({["a-zA-Z0-9_]}) Replace : Rows[\1][\2]

Rows("aaa").Item("jjj")   -> Rows["aaa"]["jjj"]