Common regular expression matching operator

2010-08-16  来源:本站原创  分类:Web  人气:139 

"^ \ \ D + $" / / non-negative integers (positive integer + 0)
"^ [0-9] * [1-9] [0-9] * $" / / a positive integer
"^((- \ \ D +) | (0 +))$" / / non-positive integer (negative integer + 0)
"^ - [0-9] * [1-9] [0-9] * $" / / negative integer
"^ -? \ \ D + $" / / integer
"^ \ \ D + ( \ \. \ \ d +)? $ "/ / non-negative floating-point (positive float + 0)
"^(([ 0-9] + \ \. [0-9] * [1-9] [0-9 ]*)|([ 0-9] * [1-9] [0-9] * \ \. [0-9 ]+)|([ 0-9] * [1-9]
[0-9 ]*))$"
/ / Are floating point
"^((- \ \ D + ( \ \. \ \ d +)?)|( 0 + (\ \ .0 +)?))$ "/ / non-positive floating-point (negative float + 0)
"^(-(([ 0-9] + \ \. [0-9] * [1-9] [0-9 ]*)|([ 0-9] * [1-9] [0-9 ] * \ \. [0-9 ]+)|([ 0-9] * [1-9]
[0-9 ]*)))$"
/ / Negative float
"^(-? \ \ D +) ( \ \. \ \ d +)? $ "/ / floating point
"^ [A-Za-z] + $" / / by the 26 English letters in the string
"^ [AZ] + $" / / by the 26 English letters Uppercase a string
"^ [Az] + $" / / by the 26 English letters in lower case string of
"^ [A-Za-z0-9] + $" / / by the numbers and 26 English-letter string
"^ \ \ W + $" / / by the numbers, 26 English letters or underscore a string
"^ [\ \ W-] + ( \ \. [\ \ w-]+)*@[ \ \ w-] + (\ \. [\ \ w-]+)+$ "/ / Email Address
"^ [A-zA-z ]+://( \ \ w + (- \ \ w +)*)( \ \. (\ \ w + (- \ \ w +)*))*( \ \? \ \ S *)? $ "/ / url
"^ [A-Za-z0-9_] * $"

相关文章
  • Common regular expression matching operator 2010-08-16

    "^ \ \ D + $" / / non-negative integers (positive integer + 0) "^ [0-9] * [1-9] [0-9] * $" / / a positive integer "^((- \ \ D +) | (0 +))$" / / non-positive integer (negative integer + 0) "^ - [0-9] * [1-9] [0-9] * $&quo

  • Regular expression matching the numerical example Analysis 2010-05-06

    We use regular expressions more often consider the realization of regular expression matching the judge, in the practical work we often encounter what needs to match the number of operation? Let us look at the number matches the regular expression to

  • java commonly used examples of regular expression matching Daquan 2010-09-06

    java commonly used example of the matching regular expression matching collection of Chinese characters Daquan regular expression: [\ u4e00-\ u9fa5] Matching double-byte characters (including Chinese characters included): [^ \ x00-\ xff] Application:

  • Greedy regular expression matching 2011-07-13

    Greedy regular expression matching 2009-07-05 09:26:03 Tags: sed regular shell greed awk Original works, for permission to reproduce, reprint, please be sure to hyperlink to the article indicating the original source , author information and this sta

  • [leetcode] Regular Expression Matching 2014-06-24

    Implement regular expression matching with support for'.'and'*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The function prototype should be: b

  • Regular expression matching Chinese characters, Ctrl + F of the Gospel! 2010-03-23

    Chinese characters matching the regular expression: [\ u4e00-\ u9fa5] Comment: The match really is a headache for the Chinese thing, with this expression on the much easier to handle Matching double-byte characters (including the Chinese characters i

  • Common regular expression 2 2010-07-19

    1. ^ \ D + $ / / match the non-negative integers (positive integer + 0) 2. ^ [0-9] * [1-9] [0-9] * $ / / matches a positive integer 3. ^ ((- \ D +) | (0 +)) $ / / match the non-positive integer (negative integer + 0) 4. ^ - [0-9] * [1-9] [0-9] * $ /

  • java regular expression matching Chinese 2011-01-25

    Java regular expression to match the Chinese characters? The following examples are given so that we match all the Chinese characters: public static void regxChinese(){ // The string to match String source = "<span title='5 Star hotel '>";

  • Regular expression matching the time format: hh: mm: ss 2011-05-03

    Format: hh: mm: ss Regular expression: "([0-1] [0-9] | (2 [0-3 ])):([ 0-5] [0-9 ]):([ 0-5] [0-9 ]) $ "

  • Common regular expression (from other places get it ... I just saved) 2010-06-30

    Original Link: http://www.weekface.info/2010/04/02/ruby-regexp-examples #1. User name register /^[a-z0-9_-]{3,16}$/ # Open letter heads, contain letters , DVD-, _,-, 3-16 Personal character #2. User password /^[a-z0-9_-]{6,18}$/ # Ibid. #3. 16 system

  • Common regular expression (from elsewhere ... I just got the save only) 2010-06-30

    Original Link: http://www.weekface.info/2010/04/02/ruby-regexp-examples #1. User name register /^[a-z0-9_-]{3,16}$/ # Open letter heads, contain letters , DVD-, _,-, 3-16 Personal character #2. User password /^[a-z0-9_-]{6,18}$/ # Ibid. #3. 16 system

  • Common regular expression written 2010-04-07

    1.IP Address verification : var ip=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$/; 2. Verify that

  • js regular expression matching the ip 2010-06-02

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content=

  • Io read a file using regular expression matching using a small example of the information 2010-08-24

    import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.regex.Matcher; import java.util.regex.Pattern; public class GetMassage ( public static void function (String filename) ( File file = new File ("./src/AOP/

  • Common regular expression (finishing ...) 2010-08-31

    1 Extraction of brackets [] content string input = "asdf[111]sdfsf[222]sdfsdf"; Regex r = new Regex(@"\[([^\]]*)\]"); MatchCollection match = r.Matches(input); foreach (Match m in match) { Console.WriteLine(m.Groups[0].Value); Console.

  • php common regular _php regular expression tutorial php regular expression used to collect 2010-05-23

    php regular expression used to collect: Match the form of China's phone number validation :0511-4405222 or 021-87888822 if or 021-44055520-555 or (0511) 4405222 Regular expression "((d (3,4)) | d (3,4) -)? D (7,8) (-d (3)) *" China Postal Code a

  • python2.x study notes (11) - regular expression 2010-03-11

    1. Regular expressions (RE) for advanced text pattern matching, and search - provides the basis for alternative functions. Regular expression (RE) is the number of characters and special symbols from the string, they describe some of these characters

  • Regular expression from the foundation to learn the 2010-03-21

    [Edit this paragraph] 1, what is the regular expression a regular expression is a pattern to match with a string of a formula for a class. Many more people because they look so strange and complex not to use - unfortunately, this article will not be

  • (Transfer) java regular expression Xiangjie 2010-04-12

    Java regular expression Xiangjie If you have used Perl or any other built-in support for regular expression language, you must know to use a regular expression pattern matching and text, and how easy it is. If you are not familiar with this term, the

  • oracle10g regular expression 2010-06-09

    The basic examples of regular expressions Before using this new feature, you need to understand the meaning of metacharacters. Full stop (.) Matching a regular expression of any character (except newline). For example, the regular expression matching