Skip to content

string literal with parentheses (t) is not matched #1621

Answered by okdana
mxschumacher asked this question in General
Discussion options

You must be logged in to vote

grep (GNU grep) 3.4 shows the expected behavior

Only because it uses BRE (grep -G) by default. rg's regex syntax is similar to PCRE (grep -P) or even ERE (grep -E)

The syntax is described here: https://docs.rs/regex/*/regex/#syntax

Basically you should do either rg 'row_to_json\(t\)' or rg -F 'row_to_json(t)'

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
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1621 on June 18, 2020 00:33.