Parsing Regular Expressions

Source: Internet
Author: User
Tags chr regular expression
A lot of recent posts ask how to get the content out of the database and then wrap it, which means regular expressions. In short, regular expressions are a powerful tool that can be used for pattern matching and substitution. We can find regular expressions in many programming languages, such as the VI editor, the Perl or PHP scripting language, and awk or sed shell programs. In addition, scripting languages such as JavaScript clients also provide support for regular expressions. Thus, regular expressions have gone beyond the limits of a language or a system and become a widely accepted concept and function.
Regular expressions allow the user to build a matching pattern by using a series of special characters, then compare the matching pattern with the target objects such as data file, program input, and form input of the Web page, and execute the corresponding program according to whether the matching pattern is included in the comparison object.
I mainly explain multiple lines of text wrapping display:
Sub Show (STR) ' Multiple lines of text display function
Str=replace (STR,CHR), <br> & Chr (+CHR (10))
Str=replace (STR,CHR (32), "")
Response.Write Str
End Sub
The regular Expression object method is used here: Replace () side
Method.

The Replace method syntax is as follows:

Describe

Replaces the text found in the regular expression lookup.

Grammar

Object. Replace (string1, string2)

The syntax for the Replace method consists of the following sections:

Partial description

Required for object. Always the name of a RegExp object.

String1 is required. String1 is the string that will be replaced with text.

String2 is required.
String2 is a replacement text string.

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.