search: use non-capturing syntax for fuzzy regex pattern
Created by: rvantonder
Since Code Insights/Compute rely on capture groups to extract values, our previous method of wrapping search terms with just (...)
creates capture groups that interfere. Instead we now wrap terms with (?:...)
which avoids creating capture groups.
Note that if the pattern is something like (a b)
where there's a space inside balanced parens, this space is treated literally because of detection I implemented to tame this sort of manipulation. I.e., there is no danger that the fuzzy regex wrapping (?:...)
risks doing something funky like (?:(a).*(?:b))
Toplevel search recognizes (?:...)
so this should be semantics preserving for backends.