Newbie School: Common Regular Expression Operators

Source: Internet
Author: User

Common Regular Expression operators:

Operator Purpose
.Full stop) Match any single character.
^Remove font size) Match an empty string that appears at the beginning of the row or the start of the string.
$Dollar sign) Match the null string at the end of the row.
A Match uppercase lettersA.
a Match lowercase lettersA.
\d Match any digit.
\D Match any single non-numeric character.
\w Matches any single letter or number character. Its synonym is[:alnum:].
[A-E] Match any uppercaseA, B, C, DOrE.
[^A-E] MatchDivision A, B, C, DAndEAny character other.
X? Matches zero or one uppercase letterX.
X* Match zero or any uppercase lettersX.
X+ Match one or more lettersX.
X{n} Exact matchNLetter (s)X.
X{n,m} Least matchedNAnd cannot exceedMLetter (s)X. If omittedM, The expression will try to match at leastN X.
(abc|def)+ Matching a series of at least one)abcOrdef;abcAnddefWill match.

Related Articles]

  • Regular Expression
  • Understanding Regular Expressions
  • Introduction to regular expression syntax in UNIX and Linux Shell

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.