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.
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:
If I understood your question well, the idea is that
a must be before
c if any of them are present. Additionally there might be some
d in whatever place.
If that's the case then you can use a regex like this: