R中预定义好的regular expressions,比如[:punct:] 代表所有标点;[:alpha:]代表所有字母;…
预定义好的regular expressions
There are a number of pre-built classes that you can use inside []:
[:punct:]: punctuation.
[:alpha:]: letters.
[:lower:]: lowercase letters.
[:upper:]: upperclass letters.
[:digit:]: digits.
[:xdigit:]: hex digits.
[:alnum:]: letters and numbers.
[:cntrl:]: control characters.
[:graph:]: letters, numbers, and punctuation.
[:print:]: letters, numbers, punctuation, and whitespace.
[:space:]: space characters (basically equivalent to \s).
[:blank:]: space and tab.
These all go inside the [] for character classes, i.e. [[:digit:]AX] matches all digits, A, and X.