VBS TUTORIAL: Introduction to Regular expressions-creating regular expressions

Source: Internet
Author: User
Tags character set regular expression

Establish regular expressions

The method for constructing regular expressions is the same as for creating mathematical expressions. That is, using multiple metacharacters and operators to combine small expressions to create larger expressions.

You can construct a regular expression by putting together various components of an expression pattern between a pair of delimiters. For Visual Basic scripting Edition, the delimiter is a pair of forward slash (/) characters. For example:


For VBScript, a pair of quotation marks ("") is used to determine the bounds of the regular expression. For example:


In the two examples shown above, regular expression patterns (expression) are stored in the Pattern property of the RegExp object.

The component of a regular expression can be a single character, character set, character range, selection between characters, or any combination of any of these components.

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.