| Title |
Test
Find
command line option no duplicate
|
| Expression |
\s*((a|b|c)\s+(?!.*\2.*))*(a|b|c)\s* |
| Description |
suppose you have a exe/command take options like "a b c" or "b c a", the sequence doesn't matter, but on option should only appear at most once.
The ?! is "negative look ahead", \2 refer the second group. |
| Matches |
"b c a", " a c b ", "a b c " |
| Non-Matches |
"a b c a", "b c a c", "a b c d", "ab c " |
| Author |
Rating:
Not yet rated.
Wang , Feng
|
| Source |
|
| Your Rating |
|