Find context free grammar for $u v w v^R$ The question is to find a CFG for this language:
$$\{ u v w v^R\ |\ u, v, w \in \{a,b\}^+,\ |u| = |w| = 2\},$$
where $v^R$ denotes the reverse of $v$.
I've been trying, but I'm not sure how to have $w$ in between $v$ and $v^R$.
Just for the v and v^R, I can do S -> aSa | bSb | epsilon  

A simple application of the pumping lemma shows that this is $\mathbb{NOT \space A \space REGULAR \space LANGUAGE}$ and so you $\mathbb{CANOT}$ use a regular expression. You need to define a CFG.
