| seangoogle@myexoss.com 2006-01-31, 7:03 pm |
| I want to write a regular expression in the Visual Studio.NET 2003
Replace Dialog that will allow me to automatically change the case of
part of the replacement text. That replacement text will typically be
a tagged expression located as part of the find. Is there a way to do
this in with VS.NET regular expressions? I can do it in successfully
using TextPad's regular expression syntax as follows, but don't want to
use TextPad just for this purpose. Here's an oversimplified example of
what I want to achieve:
--- If the source text looks like the following:
HERE is SoMe RandoM Text THAT IS in THe WrONg Case
--- The result text should look like:
here is some random text that is in the wrong case
In TextPad, I could write the following expression to achieve the
result:
Find: ^\([[:print:]]*\)
Replace: \L\1
Note the \L which forces all the characters following the switch to be
in lower case.
Any ideas?
Thanks!
|