nearness7507
nearness7507

Reputation: 9

Find multiple words in notepad++

I'd like to find exactly ("Match whole word only" function) for multiple keyword in Notepad++ (or any other application).

When I tried enable regular expression setting to search multiple string stringa|stringb, but the "Match whole word only" function was disabled ...

For example:

testSQLstring
>Test<
/SQLTest/
.SQL.

The result for "Match whole word only" for "Test" and "SQL" should be:

>Test<
.SQL.

Upvotes: 0

Views: 7907

Answers (1)

FriedSaucePots
FriedSaucePots

Reputation: 1352

You can set word boundaries with \b. http://www.regular-expressions.info/wordboundaries.html

\b(SQL|Test)\b this will match just 'SQL' or just 'Test'

^.*\b(SQL|Test)\b.*$ this will match the entire line including the given word(s)

Upvotes: 4

Related Questions