Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    $\begingroup$ You can always construct an NFA and convert it into a regular expression. You can first construct an NFA for all words containing bab or abb, then make it into a DFA, then complement it, then convert it into a regular expression. $\endgroup$ Commented Sep 23, 2017 at 22:43
  • 1
    $\begingroup$ Think of what string could precede $b$. For example, what could precede $bb$? In this way, try to come up with "building blocks" for strings not containing bab and abb. $\endgroup$ Commented Sep 23, 2017 at 22:46
  • $\begingroup$ "But putting them together is a huge animal" -- How do you "put together" regular expressions? $\endgroup$ Commented Sep 24, 2017 at 13:13
  • $\begingroup$ @Raphael we "put together" by concatenation, intersection, and union. $\endgroup$ Commented Sep 24, 2017 at 15:51
  • $\begingroup$ @fade2black I am not aware of a canonical regular expression operation that provides intersection. $\endgroup$ Commented Sep 24, 2017 at 17:07