This could be a bug or a feature request. (See also Stack Overflow question https://stackoverflow.com/questions/49231149/).
The code in find.c that recognizes regular expressions does not recognize that ( and | are metacharacters in regular expressions, so searching for 'foo|bar' (or for 'err_(remark|error)' does not trigger a regular expression search. The fix is trivial — add ( and | to the list of regular expression metacharacters.
--- find.c.original 2014-11-20 13:12:54.000000000 -0800
+++ find.c 2018-03-12 20:47:05.000000000 -0700
@@ -710,7 +710,7 @@
return(NOERROR);
}
/ see if the pattern is a regular expression /
- if (strpbrk(pattern, "^.[{*+$") != NULL) {
- if (strpbrk(pattern, "^.[{+$|(") != NULL) {
isregexp = YES;
} else {
/ check for a valid C symbol */
I have provided the patch as a file — see the attachment (I hope).
Sorry; the patch text in the bug report got mangled by MarkDown taking the
*in the comment markers as indicating italics, etc. The patch, I trust, is clean. (There are also minor grammatical errors in the report, such as unbalanced parenthese — sorry about that, too.)Hans, I have no issue with this patch, do you object?