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
regexp: add LeftmostLongest() method #3696
Labels
Milestone
Comments
https://golang.org/cl/7133051 Owner changed to @adg. Status changed to Started. |
I'm out of my depth as far as fixing the regexp engine. Does this look correct to you? http://play.golang.org/p/rYOj6jVlbi |
They are not equivalent. See http://code.google.com/p/re2/wiki/Syntax. Alternative prefers shorter, ? always prefers longer variant. |
According to http://code.google.com/p/re2/wiki/Syntax, they are not equivalent. a? always prefers a to be present, but | prefers the first variant. So the equivalent expression to ab? would be a(b|), and not a(|b). |
http://play.golang.org/p/rYOj6jVlbi is correct (ab ab ab a). It's fine to just leave this open. I'll fix the regexp match (if there is a bug, but it sure sounded like it on the review) once bigger stuff is done. It will be easy. Russ |
This issue was closed by revision f41ffc2. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: