Regular Expressions
Special Pattern Macros

  • A set of special pattern macros can be used for convenience

      Macro Represents
      \d A digit character, same as [0-9]
      \D A non-digit character
      \s A whitespace character, same as [ \t\n\r\f]
      \S A non-whitespace character
      \w A word character (alphanumeric), same as [a-zA-Z_0-9]
      \W A non-word character