# Regularity of language of words of prime length [duplicate]

Is the following language regular?

$$L_{\mathit{prime}} = \{ w \in \{0,1\}^* : |w| \text{ is prime} \}.$$

I have to either provide a DFA (if the language is regular), or prove that it is not regular using the pumping lemma.

• The language is not regular. Check the reference question for an idea how to use the pumping lemma for regular languages. – ttnick Dec 16 '19 at 11:41