if I wanted to match ‘foo13245′, can I use grep ‘foo[\d]*’?
Nope, \d has no meaning (unless using -P for PCRE). You need [[:digit:]] instead; i.e.,
grep 'foo[[:digit:]]*'
This entry was posted
on Wednesday, January 7th, 2009 at 8:30 am and is filed under grep FAQ.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.