Chemistry, asked by suman1253, 1 year ago

regex word boundary not working correctly atom

Answers

Answered by Bipashanayak
0
Hey..!

They are the same pattern repeated once, twice and three times. When I search for test with Whole Word enabled on the first file, the first line is found. When I search for ======= with Whole Word enabled on the second file, no matches are found.

Underneath the covers, Whole Word is implemented as wrapping the search text in \b tokens and performing a regular expression search. Since \b matches "word" boundaries, in other words the transition from word to not-word and vice versa, that is why it is failing your expectations here. There is no transition to or from a word to match against.

As a workaround, you could use something similar for your purposes:

Set the Find text to: [^=]=======[^=]
Disable Whole Word
Enable Regular Expressions
Execute the search

This should match your expectations.
@bipasha
Similar questions