With grep -E (or egrep), you can do something like this:
This matches everything with the pattern abba.Code:grep -E '(.)(.)\2\1' target.txt
However, I found that it doesn't work in awk. If you make an awk command like this:
It will not work. (Using two backslashes ( \\ ) doesn't work either).Code:awk '/(.)(.)\2\1/' target.txt
Is there a way to do that in awk?