[ ] Allowed [^ ] Not Allowed ( ) Required ^ Start of line $ End of line / Delimitera? Zero or one a a* Zero or more a a+ One or more a a{2} Exactly 2 a's a{2,} 2 or more a's a{2,4} 2 to 4 a's\i Ignore casing \m Multiline \s Include newlines \X Ignore whitespace \A Anchored \D Dollar end only\S Study \U Ungreedy . Any character Escape ( ) [ ] . * ? + ^ | $