Here's my question I was given: Write a regular expression to recognize strings with that have any number of a's, b's and c's in the order of abc. However, any number of d's may be among the a's, b's and c's.
Positive Examples:
dddaddbcdd
dddd
Negative examples:
dabcddadbdd
because 2nd sequence starts but does not finish.
ddcdd because c without leading ab
ddaddbddcaddbcdd because 2 abc sequences
Here's what I've tried:
[^abc]+(a|b|c)*[^abc]