3 ms·
Yes. If not escaped grep will consider the syntax as literals and search for them. Being escaped makes grep treat them as syntactic elements of the regular ex
by RiderOfGiraffes 18y ago
Yes. If not escaped grep will consider the syntax as literals and search for them. Being escaped makes grep treat them as syntactic elements of the regular expression, not characters to match.
For example, "te(s|x)t" will match neither "test" nor "text", but will match anything that has "te(s|x)t" in it. On the other hand, "te\(s\|x\)t" will match any line with "test" or "text" in it.