This question already has an answer here:
I am getting the hang of
grep and regex, but I am confused about the different options.
grep --help | grep -i "reg.*ex" -E, --extended-regexp PATTERN is an extended regular expression (ERE) -G, --basic-regexp PATTERN is a basic regular expression (BRE) -P, --perl-regexp PATTERN is a Perl regular expression
I have a general knowledge of regular expressions, but often I find myself stumbling on the basics (e.g. Using '*' when it actually requires '.*'), which I blame on not knowing the differences between the types of regular expressions (ERE, BRE, Perl regex).
Is it explained somewhere in detail?