Sublime Forum

How to skip comment when search?

#1

When I search project, there are too many comments matches in the search results, it is too difficult to find the really result I want.
Does anyone know any method to skip comments when search in files?
Thanks for any help!!

0 Likes

#2

[quote=“xeno”]When I search project, there are too many comments matches in the search results, it is too difficult to find the really result I want.
Does anyone know any method to skip comments when search in files?
Thanks for any help!![/quote]

No reliable and cross-language solutions that I know off, but this works for C/C++ code for me:

(?<!//*]|’)YOUR_SEARCH_EXPR\\

0 Likes