Occasionally, I will comment out some code to replace it with something else to see what works better or makes more sense (or, actually works).
Then, later sometimes I do a Find for something that happens to be in the commented out code.
What I would like is to be able to tell the Find to ignore commented out code.
If this is a good idea, I’ll add it as a suggestion.
Mike_D
(Mike D)
January 4, 2026, 7:23pm
2
[duplicate post] see below
RegEx?? I generally try to avoid it. I think it should be an option in the menu you showed.
Mike_D
(Mike D)
January 4, 2026, 7:27pm
4
Couldn’t you do this using RegEx? For example, to look for the keyword ‘foobar’ that is not in a line starting with a ’ (comment) marker:
Use this regex:
^[^']*foobar
Example:
[Edited with better example and screenshot]
Comments can also end a line:
counter = 100 ‘start counting at 100
But it gets too complicated very quickly:
s = “This ain't a comment”
You really need IDE support for what he’s asking for. The regex required to do it from a text angle would need to be truly epic.
Arnaud_N
(Arnaud N)
January 5, 2026, 9:04am
6
Not everyone is able to understand Regex syntax.
Not only that…
' is not the only Comment command…
Check for REM and // and maybe others ?
Arnaud_N
(Arnaud N)
January 5, 2026, 9:37am
8
Indeed, there are 3: ', // and Rem
PaulS
(PaulS)
January 5, 2026, 12:09pm
9
I always use // for comment and ‘ for commenting out code. If you use it the other way around you can search for // to find the commented out code.
There is actually a column named Type in the search result pane that correctly marks found instances as comments, if they are.
My suggestion is, to more generally allow filtering on that column.
Just yesterday I was searching for any instances where i manipulate a control’s TextColor property in code. Obviously I found many more instances of the property name (declaration / occurrence in the inspector), than occurrences in code, so I had to manually scan that column to find, what I was interested in among the search results.
MarkusR
(MarkusR)
January 5, 2026, 3:09pm
11
you could use
#Pragma Warning “This is a Test”
the ide will give you a list where you can jump around.
or use a source code version control/management, you can make a branch for tests.