Page 1 of 1

"Match whole words" does not accept underscores in

Posted: Fri May 12, 2017 9:37 am
by melkov
Most programming languages, especially C++, treat underscores as correct symbol of an identifier.

However, while searching for an identifier with underscore, "Match whole words" flag is disabled, bringing some frustration.

I see 3 ways to fix this problem:
A) add '_' to the fixed list of word characters unconditionally
B) add '_' to the list of word characters via (per-document-class) some flag
C) treat 'whole words' flag more like grep does, i.e. make it work even when search string contains some non-word characters

Either way is OK for me, please do something :)

Posted: Fri May 12, 2017 5:55 pm
by MudGuard
use

Code: Select all

\b[a-zA-Z0-9_]+\b
as regex to find whole words including underscores

Posted: Sat May 20, 2017 7:37 am
by melkov
I do not need to find all words, I need to skip over all the places where some specific word is written. For example:
1) Double-click some identifier
2) F3, F3, F3 ...

Using regular expressions and manually adding \b works, however, this is still inconvenient.

Posted: Fri Mar 02, 2018 1:34 am
by melkov
I see that this feature has been implemented in Textpad 8.
Thanks!