I ran this example in my bash terminal:
echo "ab" | egrep '\a\b' Output
ab then I ran this one:
echo "a" | egrep '\a\b' Output
a I was confused. Why did I get output? But then I input another one:
echo "a" | egrep '\ab' and didn't get output.
What is the difference between \a\b and \ab for Extended RegEx?
P.S
Regex didn't ignore the first letter:
echo "b" | egrep '\a\b' Output is empty Regex acted as I expected, but what is the difference from the first case?
P.P.S I found out that this example:
echo 'ab' | egrep '\a\b' also does not output anything. In the first case (echo "ab" | egrep '\a\b'), the output was ab. How can quotes affect regex?
echo "ab" | egrep '\a\b'does not return any result.\bis special,\ais just a more complicated way how to writea.\bis like$your examples.