Click to See Complete Forum and Search --> : A Question related to regular expression


Mushq
January 17th, 2008, 06:38 AM
I have string "[assembly: AssemblyVersion("x.x.x.x")]" where x represents value from 0 to 9, I want to replace that into "[assembly: AssemblyVersion(TestNameSpace.TestNameClass.strAssemblyVersion)]". Can anyone please tell me what regular expression I should use in find/replace dialog of visual studio to do that task?

boudino
January 21st, 2008, 03:11 AM
Find: {\[assembly\: AssemblyVersion\(}{":z\.:z\.:z\.:z"}{\)\]}
Replace: \1TestNameSpace.TestNameClass.strAssemblyVersion\3

Don't forget to check "Use" option and select Regular Expressions

P.S. I've done it just for fun.

Mushq
January 21st, 2008, 04:22 AM
Hi boudino,
Thanks a lot. :)