Skip to content
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

Add option to disable regex search and search only for exact matches #607

Closed
hauleth opened this issue Sep 19, 2017 · 7 comments
Closed

Comments

@hauleth
Copy link

hauleth commented Sep 19, 2017

This option could also accept --smart-case and --ignore-case options with would allow to case independent searches.

@BurntSushi
Copy link
Owner

BurntSushi commented Sep 19, 2017

@hauleth Why doesn't the -F/--fixed-strings flag, which is named after the corresponding flag in grep, work for your use case?

@hauleth
Copy link
Author

hauleth commented Sep 19, 2017

Oh, I've must missed that option. Sorry for this fuss.

@hauleth hauleth closed this as completed Sep 19, 2017
@cedricvanrompay
Copy link

I would suggest to add this to the FAQ or to add a section for it in the user guide because it's pretty hard to find in the user guide right now when you don't know the name of the option already.

@viggy28
Copy link

viggy28 commented May 27, 2021

I didn't find --fixed-literals, rather --fixed-strings is available.

@BurntSushi
Copy link
Owner

Yes, I misspoke. I corrected my comment.

LordFlashmeow added a commit to LordFlashmeow/ripgrep that referenced this issue Jul 22, 2021
BurntSushi#607 is the top result for the search "ripgrep disable regex". I think it makes sense to add it to the user guide, since it's a very useful flag.
BurntSushi pushed a commit that referenced this issue Jul 22, 2021
#607 is the top result for the search "ripgrep disable regex". I think
it makes sense to add it to the user guide, since it's a very useful
flag.

PR #1945
@guanghechen
Copy link

Hi, I just wonder if there is any workaround to search strings contain \n with the --fixed-strings option specified like the vscode did?

@BurntSushi
Copy link
Owner

@guanghechen Please ask a question via Discussions: https://github.com/BurntSushi/ripgrep/discussions

Please show an example of what you want. Please show what you've tried and the output of what happened when you did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants