Atomic groups

Pattern Meaning
(?>red|green|blue) Faster than non-capturing
(?>id|identity)\b Match id, but not identity
"id" matches, but \b fails after atomic group,
parser doesn't backtrack into group to retry 'identity'

If alternatives overlap, order longer to shorter.

Comments