-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Suggest -U when regex contains \n #1055
Labels
enhancement
An enhancement to the functionality of the software.
Comments
This seems like a good idea! We already do the same with the |
BurntSushi
added
the
enhancement
An enhancement to the functionality of the software.
label
Sep 15, 2018
BurntSushi
added a commit
that referenced
this issue
Sep 25, 2018
When a "\n literal is not allowed" error is reported, ripgrep will now suggest the use of the -U/--multiline flag, which enables matching newlines. Fixes #1055
Merged
BurntSushi
added a commit
that referenced
this issue
Sep 25, 2018
When a "\n literal is not allowed" error is reported, ripgrep will now suggest the use of the -U/--multiline flag, which enables matching newlines. Fixes #1055
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of ripgrep are you using?
ripgrep 0.10.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
How did you install ripgrep?
cargo install
Describe your question, feature request, or bug.
I tried this regex today:
rg '=> \{\n *break;'
. The output is:the literal '"\n"' is not allowed in a regex
I would expect this error to suggest passing
-U
to enable multiline mode, in which that pattern would be allowed.The text was updated successfully, but these errors were encountered: