Consider this pattern, again containing non-significant white space, and with the two alternatives on the second line: (?(?=[^a-z]*[a-z]) \d{2} -[a-z]{3}-\d{2} _BAR_ \d{2}-\d{2}-\d{2}) The condition is a positive lookahead assertion that matchesConsider this pattern, again containing non-significant white space, and with the two alternatives on the second line: (?(?=[^a-z]*[a-z]) \d{2} -[a-z]{3}-\d{2} _BAR_ \d{2}-\d{2}-\d{2}) The condition is a positive lookahead assertion that matches an optional sequence of non-letters followed by a letter.
Considérons le masque suivant (même conditions que le précédent) et avec deux alternatives en seconde ligne: (?(?=[^a-z]*[a-z])\d{2}[a-z]{3}-\d{2} _BAR_ \d{2}-\d{2}-\d{2}).