Hello guys, I need help with regular expressions.
Quick recap: we know that with advanced regular expressions, you can put something in parenteses to save a part of a regular expression. For example, the regular expression ^(.)(.)\2\1$ will match the words like noon and deed. However, it wil also match a string like 'aaaa' . I don't want that. Is there a way to specify that \1 and \2 cannot be the same?
Additional info: the example is a simplification of the actual problem. A workaround with egrep -v won't work.