We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Substring matches are able to "peek" outside of substrings when lookaround assertions are start/begin of the re. Here's an example of what I mean:
utop[19]> let re = Re.(compile @@ seq [bol ; str "xxx"]);; val re : Re.re = <abstr> utop[20]> Re.execp ~pos:1 ~len:3 re "yxxx";; - : bool = false utop[21]> Re.execp ~pos:1 ~len:3 re "\nxxx";; - : bool = true
This means that there's no way for the user to independently match a substring. Not really broken but counter intuitive IMHO.
cc @Drup
The text was updated successfully, but these errors were encountered:
That's what we want, for instance if we want to split a string at each beginning of line.
But indeed, there is no way to tell Re to match without look outside a substring, which might be convenient when using a string as a buffer.
Re
Sorry, something went wrong.
No branches or pull requests
Substring matches are able to "peek" outside of substrings when lookaround assertions are start/begin of the re. Here's an example of what I mean:
This means that there's no way for the user to independently match a substring. Not really broken but counter intuitive IMHO.
cc @Drup
The text was updated successfully, but these errors were encountered: