I need to write a regular expertion for the language of all the binary words that not contains continuum of more then $3$ zeros, for example $0011110100\in L,\,\,\,\,\,\,\,\,\,11000001100\notin L $
My try:
$[(0+1)^*+(00+1^*)^*+(000+1^*)]^*$
My attempt is correct?
Let us write $\varepsilon$ for the empty string and if $s$ is some string then write $s^+$ for repeating $s$ one or more times, i.e. $s^+ = ss^*$.
If $s\in L$ then either $s$ contains no ones or $s$ is of the form $s=0^*t0^*$ where $t$ is a string that begins and ends with a one and contains no 3 zeroes in a row. The following regular expression matches all strings that begin and end with a $1$ and do not contain $3$ zeroes in a row: $$E=1^+\left(0(1^+) + 00(1^+)\right)^*$$ This expression says that the string must start with at least one 1 and then it can have 1 or 2 zeroes followed by more ones any number of times.
The full answer would then be $$(\varepsilon + 0 + 00) + (\varepsilon + 0 + 00 )E(\varepsilon + 0 + 00)$$ Where $E$ is the expression defined above.
Edit: I later realized an easier, or at the very least shorter way. $$\left((\varepsilon+0+00)1\right)^*(\varepsilon+0+00)$$