From Wikipaedia, [the pumping language for regular languages][1] is the following: > Let $L$ be a regular language. Then there exists an integer $p\ge 1$ depending only on $L$ such that every string $w$ in $L$ of length at least $p$ ($p$ is called the "pumping length") can be written as $w = xyz$ (i.e., $w$ can be divided into three substrings), satisfying the following conditions: 1. $|y| \ge 1$ 2. $|xy| \le p$ and 3. for all $i \ge 0$, $xy^iz \in L$. $y$ is the substring that can be pumped (removed or repeated any number of times, and the resulting string is always in $L$). > (1) means the loop y to be pumped must be of length at least one; (2) means the loop must occur within the first p characters. There is no restriction on x and z. > In simple words, For any regular language L, any sufficiently long word $w\in L$ can be split into 3 parts. i.e $w = xyz$, such that all the strings $xy^kz$ for $k\ge 0$ are also in $L$. No let's consider an example. Let $L=\{(01)^n2^n\mid n\ge0\}$. To show that this is not regular, you need to consider what all the decompositions $w=xyz$ look like, so what are all the possible things x, y and z can be given that $xyz=(01)^p2^p$. We need to consider where the $y$ part of the string occurs. It could overlap with the first part, and will thus equal either $(01)^k$, $(10)^k$, $1(01)^k$ or $0(10)^k$, for some $k\ge 0$ (don't forget that $|y|\ge 0$). It could overlap with the second part, meaning that $y=2^k$, for some $k>0$. Or it could overlap across the two parts of the word, and will have the form $(01)^k2^l$, $(10)^k2^l$, $1(01)^k2^l$ or $0(10)^k2^l$, for $k\ge0$ and $l\ge0$. Now pump each one to obtain a contradiction, which will be a word not in your language. For example, if we take $y=0(10)^k2^l$, the pumping lemma says, for instance, that $xy^2z=x0(10)^k2^l0(10)^k2^lz$ must be in the language, for an appropriate choice of $x$ and $z$. But this word cannot be in the language as a $2$ appears before a $1$. Other cases will result in the number of $(01)$'s being more than the number of $2$'s or vice versa, or will result in words that won't have the structure $(01)^n2^n$ by, for example, having two $0$'s in a row. Each of the cases above needs to lead to such a contradiction, which would then be a contradiction of the pumping lemma. Voila! The language would not be regular. [1]: http://en.wikipedia.org/wiki/Pumping_lemma_for_regular_languages