The RegExp class in js represents a regular expression and has powerful pattern matching, text retrieval, and replacement functions. The Regular Expression Pattern rules are composed of a character sequence, including all letters and numbers. Most
Copy codeThe Code is as follows:Public static string ConvertToChineseMoney (double money){If (money Throw new ArgumentOutOfRangeException ("the parameter money cannot be a negative value! ");String s = money. toString ("# L # E # D # C # K # E # D #
Interactive Writing of Regular Expressions
For example, the buffer contains a string.
ABCD 3
Run the following command:
M-X: Re-Builder
A small buffer is displayed. Enter the regular expression D in double quotation marks. The buffer on the
Function: $1-$9 stores the matching results of the last nine regular expressions in the regular expression. These results are arranged in sequence according to the occurrence order of the submatching.
Basic syntax RegExp. $ n
Note: These attributes
The direct variable character of the regular expression:
Character
Match
\ O
NUL characters
\ T
Tab
\ N
Line Break
\ V
Vertical Tab
\ F
Page feed
\ R
Enter
Implementation ideas:
1. Use a java.net. url object to bind a webpage address on the network
2. Obtain an httpconnection object through the openconnection () method of the java.net. url object.
3. Use the getinputstream () method of the
Today, we will record some basic knowledge about regulator for future use.1. Some syntaxes to be remembered.Character matching Syntax:\ D matches the number '\ d' to 3, not C;
\ D match non-digit '\ d' match C, not match 3;
\ W matches any
Function: $1-$9 holds the matching results of the most recent 9 regular expressions in the regular expression, which are listed in the order in which the child matches appear.
Basic syntax RegExp. $n
Note: These properties are static, except that
1 OverviewThe greedy and non-Greedy modes affect the Matching Behavior of the Child expressions modified by quantifiers. The greedy mode matches as many expressions as possible on the premise that the entire expression matches successfully, the
1 OverviewThe greedy and non-Greedy modes affect the Matching Behavior of the Child expressions modified by quantifiers. The greedy mode matches as many expressions as possible on the premise that the entire expression matches successfully, the
PHPpreg_replace () regular replacement string. Data processed by a program is not always designed in advance by the database, or cannot be stored using the database structure. For example, Template engine parsing templates and junk sensitive
PHP preg_replace () Regular substitution, unlike JavaScript regular substitution, PHP preg_replace () defaults to the element that replaces all symbol matching Criteria .Preg_replace (regular expression, replace with, string, maximum number of
Regular expressionsREGEXP is the abbreviation for regular expressions.Define REGEXPThe RegExp object is used to store the retrieval mode.Define the RegExp object with the New keyword. The following code defines the RegExp object named Patt1, whose
Is the call object is an array, the array type added a prototype of the function, generally write some extensions often used. such as determining whether an element is in an array or
Regexp object
The Regexp object represents a regular expression, which is a powerful tool for matching string execution modes.
Direct amount syntax
/Pattern/attributes
Syntax for creating a Regexp object:
New Regexp (Pattern,Attributes);
Regular typeRegular expressions, also known as regular expressions. (English: Regular Expression, often abbreviated in code as regex, RegExp, or re), a concept of computer science. Regular tables are often used to retrieve and replace text that
The data that needs to be processed by our program is not always designed in advance by database thinking, or it cannot be stored with the structure of the database.
For example, template engine parsing template, garbage sensitive information
The data that needs to be processed by a program is not always designed in advance by database thinking, or cannot be stored using the database structure.For example, the template engine parses templates and filters sensitive junk information.In
This article mainly describes the PHP preg_replace () regular replacement of all strings matching the method, has a certain reference value, now share to everyone, the need for friends can refer to
PHP preg_replace () Regular substitution, unlike
Regular Expression rule syntax
What is the role of a regular expression?
It can:? Test a mode of a string. For example, you can test an input string to see if there is a phone number or a credit card number. This is called Data Validity verification;
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.