Download URL: http://www.cr173.com/soft/88309.html
Regextester is a regular expression tester that supports single-line mode, multiline mode, and classic window design, which allows you to test and analyze regular expressions. Regular expressions are typically used for two tasks: 1. Validation, 2. Search/Replace. When used for validation, it is often necessary to add ^ and $ before and after each to match the entire string to be validated, and whether the search/replace is subject to the requirements of the search
Feature Description:
Support for matching using only the selected parts of an expression
Supports both tree and table results viewing methods
Automatically select the corresponding part of the source text when a tree node or cell is selected
Table content can be exported as a CSV file (in tabular mode, right-click the result, select "Export (*.csv)" In the popup menu)
Support for dragging files as matching source text
Support Shortcut key operation (F5 run, F4 switch query replacement mode, F6 toggle result display mode, F2 copy code, F8 switch Focus)
Support for generating and copying C # code to the system Clipboard
Supports ignoring case, single-line mode, multiline mode, ignoring whitespace, explicit matching and many other options
Automatically load the last set of data that was run before the last shutdown
resolvable similar to new Regex ("abc", Regexoptions.singleline | Regexoptions.multiline) format of C # code
Pre-search for regular expressions:
Regular expression: (? <=src=\ "). *? (? =\ ") \" means escape, that is, double quotes "
where (? <=) is a reverse pre-search, indicating that the string to match must precede scr= "
(? =) is a forward pre-search, indicating that the string to be matched must be followed by "
. *? indicates the part to match
Like what:
Formal expression: (? <=src=\ "). *? (?=\")
Text to be tested:
Then after executing this regular expression, you can extract the/uploadfiles/image/20140304/20140304094318_2971.png
Getting Started with regular expressions:
\b Match the beginning or end of a word
* indicates repeated 00 or more times
0 repeats or 1 times
+ means repeat 1 or more times
{n} repeats n times
{n,} repeats n or more times
{N,m} repeats n to M times
. Represents any character other than a line break
. * Even together means any number of characters that do not contain a newline
\d represents a single digit (0, or 1, or 2 ... or 9)
\s represents any whitespace character, including spaces, tabs (tab), line breaks, Chinese full-width spaces
\w match letters or numbers or underscores or kanji
^ Start of matching string
$ match End of string
\ means escape, such as \ "means", \ (indicates (
[] denotes a range, such as [.?!] Match punctuation (. or? or!), [0-9] The meaning of the representation is exactly the same as \d: 1 digits are represented, and the same [a-z0-9a-z_] is identical to \w (if only English is considered)
| Represents a branch (or), such as \d{5}-\d{4}|\d{5}, which is used to match the U.S. ZIP code. The rules of the U.S. ZIP Code are 5 digits, or 9 digits spaced with hyphens. The reason to give this example is because it illustrates a problem: when using branching conditions, be aware of the order of each condition. If you change it to \d{5}|\d{5}-\d{4} then it will only match the 5-bit ZIP code (and the top 5 digits of the 9-bit zip code). The reason is that when matching the branching conditions, each condition will be tested from left to right, and if a branch is satisfied, it will not be able to control the other conditions.
We've already mentioned how to repeat a single character (just after the character is preceded by a qualifier), but what if you want to repeat multiple characters? You can specify sub-expressions (also called groupings) with parentheses, and then you can specify the number of repetitions of the subexpression, and you can do some other things with the subexpression (described later).
(\d{1,3}\.) {3}\d{1,3} is a simple IP-address matching expression. To understand this expression, parse it in the following order: \d{1,3} matches numbers from 1 to 3 digits, (\d{1,3}\.) {3} matches three digits plus an English period (this whole is the group) repeats 3 times, and finally adds a one to three digits (\d{1,3}).
Each number in the IP address cannot be greater than 255. Often people ask me, 01.02.03.04 such a number in front with 0, is not the correct IP address? The answer is: Yes, the number in the IP address can contain a leading 0 (leading zeroes).
Unfortunately, it will also match 256.300.888.999, an IP address that cannot exist. If you can use arithmetic comparisons, you may be able to solve this problem simply, but the regular expression does not provide any function about mathematics, so you can only use a lengthy grouping, select, character class to describe the correct IP address: ((2[0-4]\d|25[0-5]|[ 01]?\d\d?) \.) {3} (2[0-4]\d|25[0-5]| [01]?\d\d?].
The key to understanding this expression is to understand 2[0-4]\d|25[0-5]| [01]?\d\d?
\w matches any characters that are not letters, numbers, underscores, kanji
\s matches any character that is not a white letter
\d matches any non-numeric character
\b Match is not where the word starts or ends
[^x] matches any character except X
[^aeiou] matches any character except the letters AEIOU
Example: \s+ matches a string that does not contain whitespace characters.
<a[^>]+> matches a string that starts with a in angle brackets.
Software Tags: regular expression software Pro if you feel that sissy can bring you help, please help CC to give a good rating under Thank you:) Category: Regular expressions
A green version of the regular expression test tool