On 11-09-03 05:01 PM, Jon Forsyth wrote:
Hello,
According to the grep manual page I can use the -P option to use Perl
regular expressions as follows:
grep -P PERL_REGEX INPUT_FILE
however, I cannot get the following pattern to match a literal dollar sign:
grep -P makan\$ file.txt
# You have to get the backslash past the shell
grep -P 'makan\$' file.txt
# or
grep -P makan\\$ file.txt
when I know this pattern is in the file. It matches the shorter string
without the dollar sign if I leave \$ out.
Thanks,
Jon
--
Just my 0.00000002 million dollars worth,
Shawn
Confusion is the first step of understanding.
Programming is as much about organization and communication
as it is about coding.
The secret to great software: Fail early & often.
Eliminate software piracy: use only FLOSS.
"Make something worthwhile." -- Dear Hunter
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/