What can be a possible regex to match any of the following:
Eggs and Legs
Legs and Eggs
I can only think of the following regex:
(Eggs|Legs) and (Eggs|Legs)
But i want to avoid matching:
Eggs and Eggs
Legs and Legs
PS: Edited my solution to add parenthesis,
(Eggs|Legs) and (Eggs|Legs).