Extended 1003.2 compatible with regular expressions developed by the Institute of Electrical and Electronics Engineers (IEEE) (in fact, PHP does not fully support this standard ), another set of Perl-Compatible Regular expressions from the PCRE (PERL Compatible Regular Expression) library is open source software writt
be easily implemented to verify whether the content of the entered text box conforms to the valid data. However, here we apply the application of regular expressions directly in Js.
Environment layout:
Set the simplest email text input box and a submit button. If the input format is invalid, alert returns false; otherwise, true is returned;
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
]{1}, That is, the second digit that contains 3 or 5 of the 9-digit end is: [[:d igit:]]{9}$ here [:d Igit:] is a special notation, represented as a number, plus a terminator $. That is, the last 9 digits are numbers. ####################################################################### back Reference (backreference): A back reference is a useful feature. It is able to store matching portions of the expression in a temporary buffer for later reuse.
);}}****************************************************************************************************************************************************Package day02;/*** String ReplaceAll (String regex,string str)* Replace the part of the current string that satisfies the regular expression with the given string* @author DAISY.Y**/public class String_replaceall { public static void Main (string[] args) { S
likely that Javascript on the client will not accurately verify the various types of user input data, while ASP programs are running on the server, it is only related to the environment of your server. No matter what browser the client is, there is no difference for your ASP program, therefore, it is a good choice to use the back-end ASP program for Data Validity verification.
When ASP is used for backend
charactersVerify QQ numberVerify e-mail (verify MSN number)Verify the identity card number (rough check, the best server-side tuning class library again fine verification)Verify mobile phone number (including 159, does not contain PHS)Verify phone number (very complex, vs.net2005 is wrong)Verify PassportVerify IP, verify domain authentication credit card (support Visa Card, MasterCard, Discover, American Express card)Verify ISBN International Standar
://blog.csdn.net?id= Qing Moon mismatch 22. Verifying Chinese character expression ^[\u4e00-\u9fa5]{0 ,}$ describes only the example of Chinese character matching to clear the example of HTTP://BLOG.CSDN.NET/21ASPNET/23. Verify that the QQ number expression [0-9]{5,9} describes 5-9-bit QQ number matching example 10000,123456 mismatch example 10000w,http://blog.csdn.net/21aspnet/24. Verifying e-mail (same as
Regular Expression (above)Content outline: 1. What is a regular expression 2. Create a regular expression for reprinting, please specify the source, thank you! Assume that you need to enter the name, address, and date of birth in
extremely low, there is no good solution? Yes, that's the "Regular expression" object provided by VBScritp5.0, as long as your server has ie5.x installed, it will bring VBScript5.0. In fact, "regular expression" was originally a patent under Unix, especially in the Perl lan
returned.3. Perform regular expression matching according to the sequence defined in the configuration file. The configuration in the oldest matched location will be returned.4. If the regular expression can match the requested uri, the location corresponding to the regular
) "|" can be used to represent or. For example, [z | j | q] indicates matching any letter in z, j, and q.Regular Expression grouping (this part and the following are from Zhou Gong's blog :)Enclose a part of a regular expression with () to form a group, also known as a submatch or a capture group. For example, for a time in the format of "08:14:27", we can write
known as UBB code. Today's trendy forums support UBB code, such as: http://www. Chinaasp. COM (Dynamic Technology Network) of the forum is very good support UBB code. Now, let's use the regular expression object together to implement our own colorful UBB code.
First of all, your server side (IIS or PWS) to have a VBScript5.0 support environment, generally refer
expression" object provided by VBScritp5.0, as long as your server has ie5.x installed, it will bring VBScript5.0. In fact, the "regular expression" is originally a patent under Unix, especially in the Perl language is the most widely used, it is because of "regular
As a powerful tool for text substitution, search and extraction in pattern matching, the application of regular expression (Regular Expression) has been gradually infiltrated into network development from the UNIX platform, as the server-side/client Script development langua
very likely that JavaScript on the client will not accurately verify the various types of user input data, while ASP programs are running on the server, it is only related to the environment of your server. No matter what browser the client is, there is no difference for your ASP program, therefore, it is a good choice to use the back-end ASP program for Data Validity verification.
When ASP is used for ba
As a powerful tool for text substitution, search and extraction in pattern matching, the application of regular expression (Regular Expression) has been gradually infiltrated into network development from the UNIX platform, as the server-side/client Script development langua
+ str
(4) convert the mobile phone number 12988886666 to 129 8888 6666
Function telFormat (tel) {tel = String (tel); // method 1 return tel. replace (/(\ d {3}) (\ d {4}) (\ d {4})/, function (rs, $1, $2, $3) {return $1 + "" + $2 + "" + $3}); // method 2 return tel. replace (/(\ d {3}) (\ d {4}) (\ d {4})/, "$1 $2 $3 ");}
(\ D {3} \ d {4} \ d {4}) can match the complete mobile phone number and extract the first 3, 4-7, and 8-11 digits, respectively, "$1 $2 $3" is a new string consisting of thre
Expression Library query)
1. NSPredicate
Brief description: NSPredicate in the Cocoa framework is used for queries. Its principles and usage are similar to where in SQL, and its function is equivalent to database filtering.
NSPredicate *predicate = [NSPredicate predicateWithFormat:(NSString *), ...];
Among them, the commonFormatInclude:
(1) Comparison operators: >,
Example: @ "number> 100"
(2) range ope
: Similar to the function of SUBSTR4,regexp_replace: Similar to the function of REPLACEThey are used in the same way as Oracle SQL functions like, INSTR, SUBSTR, and replace usages.However, they use POSIX regular expressions instead of the old percent (%) and wildcard character (_) characters.POSIX Regular expressions are composed of standard metacharacters (meta
A. Regular Expressions:Metacharacters is a character used to illustrate the meaning of a character expression, in short, a character used to describe a character.The regular expression re (Regular expression) is a string of charac
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.