[clug] Circumflex

Bryan Kilgallin (iiNet) kilgallin at iinet.net.au
Sun Aug 20 07:33:44 UTC 2017

Thanks, Eyal:

> I think that the '\d' notation is a Perl extension, so try
>      grep -P ^\d'

I was confused among versions of regular expressions! Discovering by 
trial and error. So to search for `-' I had to escape it with `\'.

What Web resource explains standard, extended, and Perl variants?

> Note that 'egrep' is short for 'grep -E' (extended regex) and you cannot 
> use '-E' and '-P'
> together as they have conflicting rules.
Grep highlighted searched characters--while egrep did not.

More information about the linux mailing list