What is a regexp that accepts everything over the language {0,1} but has no substring 110 or 101?
Accept:
- 111111
- 000011111
- 100001000001001
- 010
- 1
Reject:
- 100110
- 010100
- 123
Edit: Per comments on answers below, this question is asking for a formal regular expression.