KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Using the find and replace dialog in Visual Studio (2010) is it possible to replace some text but to preserve the case of the text being replaced. ie. I want to change 'foo' to 'bar' but in my code I have Foo, foo and FOO. I want the replacement to be Bar, bar, BAR respectively. Is it possible? I suspect I need to use the regular expression functionality but I need assistance in doing so. EDIT : I know I can set the match case option, but all that option does is limit the replace to text matching the case of the search term. This is how I am doing it at the moment, but it is tiresome having to do three replacements - foo, Foo and FOO
Tags (comma-separated)
Save Edits
Cancel