There appears to be a problem with using exclusion matches at the start of a regex query.
Specifically, with regex enabled, searching for DR33 gives me the following matches:
Quote GDR336.pdf
Quote GDR337.pdf
DR33075.pdf
However, trying to eliminate those with G preceding the criteria by changing it to [^G]DR33 gives no matches when it should show DR33075.pdf (as confirmed by using regexpal.com)
This issue does not happen if the match is not at the start of the line, ie ABCDR33075.pdf is correctly matched.
Regex problem at start of line
Re: Regex problem at start of line
[^G] must match one character.
Since there is no character before DR3 in DR33075.pdf, the expression does not match.
Please try the regex search:
- Not G or start of filename, followed by DR3.
Since there is no character before DR3 in DR33075.pdf, the expression does not match.
Please try the regex search:
Code: Select all
([^G]|^)DR3
Re: Regex problem at start of line
OK. Thanks for the explanation.
http://www.regular-expressions.info/cha ... ml#negated explains the negated character class also matches line break characters and since (I presume) Everything doesn't consider these, it's a "gotcha" people need to be aware of.
FTR The online evaluator at http://regexr.com/3bmku shows what is being matched.
http://www.regular-expressions.info/cha ... ml#negated explains the negated character class also matches line break characters and since (I presume) Everything doesn't consider these, it's a "gotcha" people need to be aware of.
FTR The online evaluator at http://regexr.com/3bmku shows what is being matched.