Description Syntax Note
Case insensitive (?i) Place at the beginning of the expression.
Class [ ] \d and [0-9-] are equivalent.
Digit \d \D for anything that is not a digit.
Lookahead, negative (?!pattern
Lookahead, positive (?=pattern
Lookbehind, negative (?<!pattern
Lookbehind, positive (?<=pattern
Multi-line match (?m) Place at the beginning of the expression. Similar to Perl’s m//g.
No magic \Q \E No special meaning to any characters between these.
Range {n,m} Minimum of n, maximum of m.
Whitespace \s \S for anything that is not whitespace.

Note : Beginning settings are combined. For example (?mi) considers multiple lines and is case insensitive.