"foobar" =~ /
(.) # any character, followed by a
\1 # repeat of previously matched character
/x;
pcre *pat = pcre_compile("(.) # any character, followed by a\n"
"\\1 # repeat of previously matched character\n",
PCRE_EXTENDED,
...);
pcre_exec(pat, NULL, "foobar", ...);
PCRE version 8.30-PT1 2012-01-01
re> /ab|c[de]/iB
------------------------------------------------------------------
0 7 Bra
3 /i ab
7 38 Alt
10 /i c
12 [DEde]
45 45 Ket
48 End
------------------------------------------------------------------