toss
toss

Reputation: 1

Is there a way commenting out search terms ? C#

is there a way in Visual Studios 2015 to comment out every single line that contains my search term?

Example:

1.)I lookup for the word "apple"

2.) >>>> every line that contains the term "apple" will be commented out automatically

Upvotes: 0

Views: 42

Answers (1)

Orel Eraki
Orel Eraki

Reputation: 12196

Find and Replace -> Replace in Files

  • Find what: \b.apple[^\r\n]
  • Replace with: //$&
  • Look in: Current Document
  • Find options: Use Regular Expressions

enter image description here

Upvotes: 2

Related Questions