`grep` versions vary to the extent they support regexes; `egrep` does, but it isn't installed everywhere.  +1 for sed.