Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-05-07 22:26
Updated·2024-05-07 22:39
Flavor·PCRE2 (PHP)

/
(?<!\S)(?P<set> (?:(?P<a>A) | (?P<b>B) | (?P<c>C)) (?: (?(a) (?!A)) (?(b) (?!B)) (?(c) (?!C)) (?&set) )? )\s
/
gmx
Open regex in editor

Description

Matches any non-repetitive permutations of characters in a set, separated by whitespaces. For the set of characters ABC: Matches: A, BAC, CA... Doesn't match: BB, ABA, CBD...

Submitted by nuru