Star (. *) Represents any number of characters (excluding line breaks)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.