6

I'm a newbie on regular expression and want to do some practicing with the 'grep' command. However, I have noticed that people have been using the following commands for rgx.

grep -E <regular expression pattern>
grep -P <regular expression pattern>
grep -e <regular expression pattern>
grep <regular expression pattern>

Can some one tell me what's the difference between them? I have look them up in "man" command and some simple googles, but either is too brief or too overwhelming to understand (e.g. what is 'perl style' or extended regular expression?).

serenesat
  • 4,596
  • 10
  • 34
  • 52
hackjutsu
  • 7,564
  • 12
  • 43
  • 82

0 Answers0