Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to comment or delete a line in my code if i find a string using Find and Replace window in Visual Studio

VB
Button1.Animation=30
Button2.Animation=30
Button3.Animation=30
Button4.Animation=30


So here if i found ".Animation" in my find box then i have to replace the line like

VB
'Button1.Animation=30
'Button2.Animation=30
'Button3.Animation=30
'Button4.Animation=30
Posted

I don't know the exact expression you would need, but I found this[^] resource that may help you if you haven't seen it yet.

There is also a small tip/trick/article here on CP. It isn't highly rated and I haven't read it too carefully yet, but there may be some good info in there too for you. Visual Studio Find/Replace Regular Expression Usage[^]
 
Share this answer
 
v2
find (case off) : {button.\.animation.*=.*30}
replace : \'\1
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900