Often we are asked to write regular expression for the set of words that contain a certain string pattern, like $aba$. But what about the opposite?Is there any generic way to write a regular expression for the set of all words that do not contain a certain pattern?
How to write regular expression excluding certain pattern aba from albhabet set {a,b}?
algorithms;regular expressions