I have the following example expression that I pass egrep over a list of words:
^([a-z])lu([a-z])\2er$
I would like to further indicate that the contents of \ 1 and \ 2 must be different, for example. it will be bluff but not blubber. Is there a way to build this in the expression itself (so that I can get my results directly from egrep or something like that), or am I sticking to this in some real language with regular expression support and manually checking that none of my groups is not the same?
source
share