-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Minimize false positives when falling back to CPU for end of line/string anchors and newlines #5659
Labels
bug
Something isn't working
Comments
anthony-chang
added
bug
Something isn't working
? - Needs Triage
Need team to review and classify
labels
May 26, 2022
This was referenced May 26, 2022
Examples in RegularExpressionSuite that we want to support
|
This was referenced Apr 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The changes in #5610 add very broad checks for patterns containing end of line anchor
$
immediately next to a newline, begin-of-line anchor^
or repetition that could produce empty results. However, this results in false positives:$
and^
inside character classes are being treated as anchors, eg. the pattern0*[D$3]
has no string anchors but will still fallback to CPU.$
, meaning something like\na$
is allowed, but(\na)$
will fallback to CPU. We should instead check only the component in the group that is closest to the$
.^([a-z]*)([0-9]*)([a-z]*)$
which have no line terminator characters.Steps/Code to reproduce bug
Test with the above examples.
Expected behavior
We should support these cases on GPU, and they should be consistent with CPU
Environment details (please complete the following information)
N/A
Additional context
None.
The text was updated successfully, but these errors were encountered: