This question is taken from a past exam :
Write a regular expression to generate the language $L$ over the alphabet $\Sigma = \text{{0, 1}}$ such that $L = \{w \mid \#_0(\text{prefix}(w)) - \#_1(\text{prefix}(w))\leq 1 \}$.
In plain language, $L$ is the language of words over $\text{{0, 1}}$ where any string respects the property that the difference between the number of $0$'s and the number of $1$'s in every prefix of the word is less than or equal to $1$ (this includes negative differences, as well).
My questions is, is this language even regular to begin with? I can't help but think the question is ill-formed.