Archive for January 7th, 2009

if I wanted to match ‘foo13245’, can I use grep ‘foo[\d]*’?

Wednesday, January 7th, 2009

Nope, \d has no meaning (unless using -P for PCRE). You need [[:digit:]] instead; i.e.,

grep 'foo[[:digit:]]*'