(?:regexp) means a simple grouping of regexp as a unit -- equivalent to (regexp) except it does not generate a $n reference |
regexp1(?=regexp2) matches to regexp1 followed by regexp2 but regexp2 is not considered part of match
|
regexp1(?!regexp2) matches to regexp1 NOT followed by regexp2 |
(?i) (?m) (?imsx) etc are equivalent to specifying modifiers i, m or i and m and s and x respectively |