Common regular syntax for the Android development series

Source: Internet
Author: User

the syntax for regular expressions is too complex to summarize the common syntax for 14, as follows: 1. \b Metacharacters to match the beginning and end of a word   2.: metacharacters, matches any character except newline characters   3. * Meta-characters, match * Previous content, continuous re-use any time   4. \d metacharacters, matching any number   5. \s metacharacters, matching any whitespace characters, including spaces, tabs (tab), line breaks, Chinese full-width spaces, etc.   6. \w metacharacters, matching letters or numbers or underscores or kanji, etc.   7. ^ and & metacharacters, match position, start and end of match string   8. * repeat 0 or more times + Repeat one or more times             ? repeat 0 or one time {n} repeats n times {n,} repeats n or more times {n,m} repeats n to M times   9. [], match any of the characters in [], such as [ABCD] matches any one of the a,b,c,d   [A-z0-9a-z], []-match from previous character to after   11. {}, representing the number of previous characters   \w matches any characters that are not letters, numbers, underscores, kanji \s matches any character that is not a white letter \d matches any non-numeric character \b match is not where the word starts or ends [^x] matches any character except X [^aeiou] matches any character except the letters AEIOU a.*b greedy match, match the maximum string that matches the condition, such as AAA_BWEWQEB, matches not aaa_b is all characters   a.*?b Lazy match, match the minimum string that meets the criteria, ibid.

Common regular syntax for the Android development series

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.