3

I understand that GNU grep without -E uses basic regex and that grep -E uses extended regex. Is there any harm in using grep -E even for situations that would work with plain grep?

1 Answer 1

4

Not much. Back referencing is not possible in grep -E, so you cannot match the same text as previously matched by a (..) capturing group (though some grep implementations like GNU and BSD grep allow it as a non-standard extension).

And if you want to match literal braces or parentheses,?,+, you now will need to escape them...

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.