Comment: Anchor the pattern so we do the duplicate scan only once
\Astart of string
Comment: For each letter, test to see if it's duplicated in the input string
Condition(?(?=[^a]*+a[^a]*a)(?<da>)) Uses the first branch if the lookaround matches
Positive Lookahead(?=[^a]*+a[^a]*a) Negated Character Class[^a]*+ *+matches any number of characters outside the set below:
athe literal a (9710 / 1418 / 6116) (case sensitive)
athe literal a (9710 / 1418 / 6116) (case sensitive)
Negated Character Class[^a]* *matches any number of characters outside the set below:
athe literal a (9710 / 1418 / 6116) (case sensitive)
athe literal a (9710 / 1418 / 6116) (case sensitive)
If the condition is true, match this branch:(?<da>) Group da(?<da>) — does not consume characters
Condition(?(?=[^b]*+b[^b]*b)(?<db>)) Uses the first branch if the lookaround matches
Positive Lookahead(?=[^b]*+b[^b]*b) Negated Character Class[^b]*+ *+matches any number of characters outside the set below:
bthe literal b (9810 / 1428 / 6216) (case sensitive)
bthe literal b (9810 / 1428 / 6216) (case sensitive)
Negated Character Class[^b]* *matches any number of characters outside the set below:
bthe literal b (9810 / 1428 / 6216) (case sensitive)
bthe literal b (9810 / 1428 / 6216) (case sensitive)
If the condition is true, match this branch:(?<db>) Group db(?<db>) — does not consume characters
Condition(?(?=[^c]*+c[^c]*c)(?<dc>)) Uses the first branch if the lookaround matches
Positive Lookahead(?=[^c]*+c[^c]*c) Negated Character Class[^c]*+ *+matches any number of characters outside the set below:
cthe literal c (9910 / 1438 / 6316) (case sensitive)
cthe literal c (9910 / 1438 / 6316) (case sensitive)
Negated Character Class[^c]* *matches any number of characters outside the set below:
cthe literal c (9910 / 1438 / 6316) (case sensitive)
cthe literal c (9910 / 1438 / 6316) (case sensitive)
If the condition is true, match this branch:(?<dc>) Group dc(?<dc>) — does not consume characters
Condition(?(?=[^d]*+d[^d]*d)(?<dd>)) Uses the first branch if the lookaround matches
Positive Lookahead(?=[^d]*+d[^d]*d) Negated Character Class[^d]*+ *+matches any number of characters outside the set below:
dthe literal d (10010 / 1448 / 6416) (case sensitive)
dthe literal d (10010 / 1448 / 6416) (case sensitive)
Negated Character Class[^d]* *matches any number of characters outside the set below:
dthe literal d (10010 / 1448 / 6416) (case sensitive)
dthe literal d (10010 / 1448 / 6416) (case sensitive)
If the condition is true, match this branch:(?<dd>) Group dd(?<dd>) — does not consume characters
Condition(?(?=[^e]*+e[^e]*e)(?<de>)) Uses the first branch if the lookaround matches
Positive Lookahead(?=[^e]*+e[^e]*e) Negated Character Class[^e]*+ *+matches any number of characters outside the set below:
ethe literal e (10110 / 1458 / 6516) (case sensitive)
ethe literal e (10110 / 1458 / 6516) (case sensitive)
Negated Character Class[^e]* *matches any number of characters outside the set below:
ethe literal e (10110 / 1458 / 6516) (case sensitive)
ethe literal e (10110 / 1458 / 6516) (case sensitive)
If the condition is true, match this branch:(?<de>) Group de(?<de>) — does not consume characters
Condition(?(?=[^f]*+f[^f]*f)(?<df>)) Condition(?(?=[^g]*+g[^g]*g)(?<dg>)) Condition(?(?=[^h]*+h[^h]*h)(?<dh>)) Condition(?(?=[^i]*+i[^i]*i)(?<di>)) Condition(?(?=[^j]*+j[^j]*j)(?<dj>)) Condition(?(?=[^k]*+k[^k]*k)(?<dk>)) Condition(?(?=[^l]*+l[^l]*l)(?<dl>)) Condition(?(?=[^m]*+m[^m]*m)(?<dm>)) Condition(?(?=[^n]*+n[^n]*n)(?<dn>)) Condition(?(?=[^o]*+o[^o]*o)(?<do>)) Condition(?(?=[^p]*+p[^p]*p)(?<dp>)) Condition(?(?=[^q]*+q[^q]*q)(?<dq>)) Condition(?(?=[^r]*+r[^r]*r)(?<dr>)) Condition(?(?=[^s]*+s[^s]*s)(?<ds>)) Condition(?(?=[^t]*+t[^t]*t)(?<dt>)) Condition(?(?=[^u]*+u[^u]*u)(?<du>)) Condition(?(?=[^v]*+v[^v]*v)(?<dv>)) Condition(?(?=[^w]*+w[^w]*w)(?<dw>)) Condition(?(?=[^x]*+x[^x]*x)(?<dx>)) Condition(?(?=[^y]*+y[^y]*y)(?<dy>)) Condition(?(?=[^z]*+z[^z]*z)(?<dz>)) Comment: Skip any duplicated letter and throw it away
\Kresets the starting point of the reported match. Any previously consumed characters are no longer included in the final match
Comment: Check if the next letter is a duplicate
Non-Capturing Group(?:
a (*THEN) (?(da)(*FAIL))
| b (*THEN) (?(db)(*FAIL))
| c (*THEN) (?(dc)(*FAIL))
| d (*THEN) (?(dd)(*FAIL))
| e (*THEN) (?(de)(*FAIL))
| f (*THEN) (?(df)(*FAIL))
| g (*THEN) (?(dg)(*FAIL))
| h (*THEN) (?(dh)(*FAIL))
| i (*THEN) (?(di)(*FAIL))
| j (*THEN) (?(dj)(*FAIL))
| k (*THEN) (?(dk)(*FAIL))
| l (*THEN) (?(dl)(*FAIL))
| m (*THEN) (?(dm)(*FAIL))
| n (*THEN) (?(dn)(*FAIL))
| o (*THEN) (?(do)(*FAIL))
| p (*THEN) (?(dp)(*FAIL))
| q (*THEN) (?(dq)(*FAIL))
| r (*THEN) (?(dr)(*FAIL))
| s (*THEN) (?(ds)(*FAIL))
| t (*THEN) (?(dt)(*FAIL))
| u (*THEN) (?(du)(*FAIL))
| v (*THEN) (?(dv)(*FAIL))
| w (*THEN) (?(dw)(*FAIL))
| x (*THEN) (?(dx)(*FAIL))
| y (*THEN) (?(dy)(*FAIL))
| z (*THEN) (?(dz)(*FAIL))
) x modifier: extended. Ignores unescaped whitespace and comments outside character classes