Skip to content

[Noob] How to search urls? #2788

Answered by BurntSushi
rieje asked this question in Q&A
Discussion options

You must be logged in to vote

grep uses BREs by default, where things like ? aren't treated as special meta characters by default. Instead, you have to do \?. In contrast, ripgrep is closer to grep -E by default, where I imagine you'd get the same result as ripgrep here.

The correct thing to do here, whether it's grep or ripgrep, is to use the -F/--fixed-literals flag. That will treat the pattern as literal text completely.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants