文档介绍:正则表达式【较全】(Regular expressions [larger])
IP verifies regular expressions:
The first: (IP 0: you can't / " ((([1~9] |) (W matches any character that is not alphabetic, numeric, underlined, or Kanji
\S matches any character that is not whitespace
\D matches any non numeric characters
The \B match is not the beginning or end of the word [x] matches any character other than x
[aeiou] matches any characters other than aeiou letters
Regular expressions used:
Regular expression matching Chinese character: [\u4e00~\u9fa5], a [\ to -\].
Commentary: match Chinese is really a headache, with this expression will be easy to handle
Matches double byte characters (including Chinese characters), :[ \xOO~\xff]
Commentary: can be used to calculate the length of a string (a double byte character length 2, ASCII character 1)
Regular expression that matches blank rows: \n\s*\r
Comment: can be used to delete blank lines
Regular expression matching HTML markers: < (\S*?)「>]*>.*? 〈/\1>|〈. * / >?
Commentary: the online version is so bad that it can only match the parts, and still can't do anything about the complex nested markup
Regular expressions that match the first and last blank characters: \s*|\s*$
Commentary: can be used to remove the trailing blank characters (including spaces, tabs, formfeed etc.), expression is very useful
A regular expression that matches the Email address: