`regex` should wrap regex in parens when prefixing with ^
Closed this issue · 0 comments
natefaubion commented
Describe the bug
regex will prefix with ^, but does not account for regex precedence with |.
To Reproduce
regex "a|b"
Expected behavior
It should behave as ^(a|b), but the precedence of ^a|b is equivalent to (^a)|b.