Reputation: 23374
The pattern I'm looking for looks like $guid1$
with the $
signs on each side. Unfortunately, my regex in grep
(and probably elsewhere) interprets that last $ as something else.
"\$guid[0-9]\$"
works but "\$guid[0-9]\$"
does not. What can I do?
Upvotes: 1
Views: 34
Reputation: 785176
You need to use single quotes around your regex:
grep '\$guid1\$' file
OR use fgrep
for fixed string search:
fgrep '$guid1$' file
Upvotes: 1