Point. Represents any character, excluding line breaks. \ N indicates a line break
Star * indicates any number
\ B indicates the start or end of a word.
\ S indicates space
The number is also + ,?
+ Indicates repeat once or more times
? Indicates zero or one repeat
* Indicates zero or more times of repetition.
^ Indicates the start of a string
$ Indicates the end of the string.
Similar to \ B.
\ Represents the Escape Character \ represents the character \ itself. For example, C :\\ windows indicates C: \ WINDOWS
\(? 0 \ D {2} [)-]? \ D {8 }.
"(" And ")" are also metacharacters, which will be mentioned later in the grouping section. Therefore, escape is required here.
This expression can match phone numbers in several formats, such as (010) 88886666, 022-22334455, or 02912345678. Let's analyze it. First, it is an escape character \ (it can appear 0 times or once (?), Then there is a 0 followed by two numbers (\ D {2}), followed by one of),-, or space. It appears once or does not appear (?), The last eight digits are (\ D {8 }).
[] Indicates that you only need to match any one.
[^ Character] indicates matching other characters except characters
\ Uppercase letters indicate antsense
Copy the Translation results to Google
Star (. *) Represents any number of characters (excluding line breaks)