"Match whole words" does not accept underscores in

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
melkov
Posts: 4
Joined: Sun Nov 13, 2011 10:25 pm

"Match whole words" does not accept underscores in

Post 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 :)
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

use

Code: Select all

\b[a-zA-Z0-9_]+\b
as regex to find whole words including underscores
melkov
Posts: 4
Joined: Sun Nov 13, 2011 10:25 pm

Post 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.
melkov
Posts: 4
Joined: Sun Nov 13, 2011 10:25 pm

Post by melkov »

I see that this feature has been implemented in Textpad 8.
Thanks!
Post Reply