4 ms·
Yeah the latter. In an engine supporting ^ and $, searching for this (a|b|^)(c|d|^)foo is equivalent to searching for this ^((.*a|.*b)(c|d)|c|d)?foo
by zeroimpl 3y ago
Yeah the latter.
In an engine supporting ^ and $, searching for this
(a|b|^)(c|d|^)foo
is equivalent to searching for this
^((.*a|.*b)(c|d)|c|d)?foo.*$
And in this context you can drop the leading/trailing ^/$ since they are implicit.