In v686, if I enable regex searches using Ctrl R, matches are correctly returned for regex criteria such as:
12(3|4)4
However, switching regex off and using the regex prefix, ie
regex:12(3|4)4
it appears that the prefix is being ignored and returns matches no different from just using 12(3|4)4
I've tried the following without success:
regex:^.*12(3|4)4.*$
Checking the "Allow round bracket grouping" in the option menu makes no difference to results. However, using the following syntax produces the correct results, implying that the prefix is being recognised:
regex:12[34]4
I get the same results when using the web interface, which means other users can't use this type of regex query unless they access the index via the ETP server.
Am I doing anything wrong or is this a bug with the | character when used within curved brackets?
Problem using regex: syntax
Re: Problem using regex: syntax
When regex is enabled from the Search menu, the entire search is treated as the regex expression.
When regex is disabled from the Search menu, the search is broken down into different terms.
| will split terms with the OR operator. regex:12(3|4)4 would become regex:12(3 OR 4)4
Use double quotes to escape the |
When regex is disabled from the Search menu, the search is broken down into different terms.
| will split terms with the OR operator. regex:12(3|4)4 would become regex:12(3 OR 4)4
Use double quotes to escape the |
Code: Select all
regex:"12(3|4)4"
Re: Problem using regex: syntax
Excellent, thanks very much for the clarification. That works fine.
To avoid confusion, maybe it would be worth adding a statement under the Regex section here:
http://www.voidtools.com/support/everything/searching/
to put all regex criteria in inverted commas whenever using the regex: prefix
To avoid confusion, maybe it would be worth adding a statement under the Regex section here:
http://www.voidtools.com/support/everything/searching/
to put all regex criteria in inverted commas whenever using the regex: prefix