[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep question
From: |
Paul Jarc |
Subject: |
Re: grep question |
Date: |
Mon, 10 Dec 2001 11:18:05 -0500 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 (i386-redhat-linux-gnu) |
Fábio Silvestri <fabio@informatec.com.br> wrote:
> X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
>
> I can't grep this string in a text file, what's the right regex to grep this
> string?
You could use fgrep to avoid the need for a regexp. Otherwise, see
the man page for grep: you need to escape each special character with
a backslash. That includes "\", "^", "$", "[", and "*" here:
X5O!P%@AP\[4\\PZX54(P\^)7CC)7}\$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!\$H+H\*
paul
- grep question, Fábio Silvestri, 2001/12/10
- Re: grep question,
Paul Jarc <=