Home
Tester
Reference
About
Pattern
\b(\p{L}+)\b (?<!\b\1\b.*\b\1\b) (?!(?:.*?\b\1\b){2}) (?=.*?\b\1\b)
Input
A
B
C C B C A D ABCD
A B C C B C A D ABCD
Options
Ignore Case
Ignore Whitespace
Explicit Capture
Culture Invariant
Singleline
Multiline
Right To Left
ECMA Script
Start from position:
Max matches to find:
Replacement
Replace matches with...
Click the
context
tab to see replacements.
Regex Info
Table
Context
Split List
2
matches found in about
13
milliseconds.
Show Permalink
Permalink
Index
Position
Matched String
$1
0
0
A
A
1
2
B
B
A
B
C C B C A D ABCD
empty string
A
whitespace
B
C C B C A D ABCD