Regular Expressions Common Symbols description

Source: Internet
Author: User

Regular Expressions Common notation Description:

1. Is any symbol except for line break

2, \s blank symbol

3, \s any symbol other than the blank symbol

4, \w letters, numbers, underline

5. \w any symbol except letters, numbers, underscores

6, \d numerals (0----9)

7, \d any other symbol except the number

8. ^ String start

9, $ string End

10, * Match 0 to countless times (matches the letter or number in front of the symbol, etc.)

11, + match 1 to countless times (matches the letter or number in front of the symbol, etc.)

12,? Match 0 or 1 times (matches the letter or number in front of the symbol, etc.)

13, {x} repeats x times

14, {x,} repeat at least x times

15, {x, y} repeats every second to Y times

16, [] character group, representing the range of characters

17, () capturing group (sub-expression)

18, \ Escape symbols

Character groups:

? [0-9] The number 0 to the array 9 any one

? [A-z] letter A to any of the letter Z

? [^CFC] except for any one character in the letter C F C

? [\ A-\ calls] Chinese characters in any one of the Chinese characters note

? [^a-z] Any character except the letter A to the letter Z

? [^-a-c] In addition to-characters and any one character from letter A to letter Z

?   | Multi-Select branch, or relationship

? \1 \2 ... Reverse Reference < (\w) >.*</\1> Reference The result of the first capturing group, used to match the closed tag of the HTML

Regular Expressions Common Symbols description

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.