Regular Expression

  • \d match any digit character [0-9]
  • \w match word character [a-z,A-Z,0-9 and _’s]
  • \s match a whitespace [space ,tab]
  • \t match a tab
  • ?
  • +
  • []
  • [^]
  • *
  • . can match any character except the newline character
  • {3} means repeat 3 times
  • escape character 就是转义字符
  • ^ means start with balabala~~
  • & means end
  • | means or for example (car|ship|plane)
坚持原创分享,您的支持将鼓励我继续创作!