0 votes

How would you do a Boolean Regexp search with the first pattern in case sensitive and not the second one. E.g. Boolean Repexp for:

PATTERN1 AND pattern2

If I enable the "Match case" button, it will affect the 2 patterns, but I want only the first one, I don't care the 2nd one being case sensitive.

I tried witth fully regexp method like adding /i (or whatever) but it did not work.

asked by (1.6k points)

1 Answer

0 votes

Yes, set the default to be case-sensitive then use the regex instruction (?i:) to switch part of the expression case-insensitive, e.g.

PATTERN1 AND "(?i:pattern2)"

The quotes are important otherwise the Boolean engine will use the parenthesis for precendence.

answered by (67k points)
...