(?=pattern) - zero-width positive look-ahead (?!pattern) - zero-width negative look-ahead (?<=pattern) - zero-width positive look-behind (?<!pattern) - zero-width negative look-behind (?{ code }) - zero-width assertion with embedded code (??{ code }) - postponed subexpression (?>pattern) - "independent" subexpression (?(condition)yes-pattern|no-pattern) - conditional expression (?(condition)yes-pattern)
In reply to real world extended regex examples by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |