Tag:regular expression
-
Time:2021-1-20
Copy codeThe code is as follows: <table> <tr><td>aaaa</td></tr> <tr><td>bbbb</td></tr> <tr><td>cccc</td></tr> <tr><td>dddd</td></tr> </table> How to match text like this with PHP regular expressions??My first thought:Pattern: “/ < tr > [. N] *? < \ / TR >” (this is wrong)Idea: “can match any non newline character, use the” [. [n] “combination, so that it can match […]
-
Time:2021-1-15
In fact, I also have a headache about regular expressions. Baidu has collected some information. To sum up, let’s leave a backup here. Questions to consider: what is the legal date; the number of days in each month is different; the problem of leap year…. 1. Legal date: the date and time between 12:00:00 midnight […]
-
Time:2021-1-13
If “^” appears in “[]”, it means that the expression does not match the characters in “[]”, such as “/ [^ A-Z] /” does not match any lowercase letters! And the regular expression gives several default values of “[]”, as follows: ‘[: alnum:]’ matches any letterAlphanumeric characters: ‘[:alpha:]’ and ‘[:digit:]’. ‘[: Alpha:]’ matches any letter […]
-
Time:2021-1-9
Take mailbox verification as an example. Most regular expression codes written by people on the Internet can’t verify this mailbox [email protected], and cannot be [email protected] 。 Last time I found out youku.com (Youku) user registration has this problem, as shown in the figure below: Today, we found that QQ wechat has the same […]
-
Time:2021-1-8
Regular expression (ABR. Regex) is powerful and can be used to find the information in a large string of characters. It uses the conventional character structure expression to function. Unfortunately, simple regular expressions are far from enough for some advanced applications. If the structure of filtering is complex, you may need to use advanced regular […]
-
Time:2021-1-6
This article is to introduce the precautions when using exec in JavaScript for global matching of regular expressions.Let’s take a look at the common usage: Copy codeThe code is as follows: <script type=”text/javascript”> var pattern = /http:\/\/([^\/\s]+)/; alert(pattern.exec(‘http://www.codebit.cn’)); // http://www.codebit.cn,www.codebit.cn alert(pattern.exec(‘http://YITU.org’)); // http://YITU.org,YITU.org //It can also be written directly as / http: \ / \ […]
-
Time:2020-12-28
Copy codeThe code is as follows: <input\b(?=[^>]*name=”__EVENTVALIDATION”)(?=[^>]*value=”([^”]+)”)[^>]+>
-
Time:2020-12-24
Mind mapClick the figure below to see the specific content!introduce Regular expression, you should be often used in the development, now many development languages have regular expression applications, such as JavaScript, Java,. Net, PHP and so on, I today to my understanding of regular expression with you nag, improper, please give me more advice! Terms […]
-
Time:2020-12-23
There is a paragraph on page 72 of “the essence of JavaScript language”: Regexp objects created with regular expression literals to share the same single instance: Copy codeThe code is as follows: function make_a_matcher( ) { return /a/gi; } var x = make_a_matcher( ); var y = make_a_matcher( ); //Note: X and y are the […]
-
Time:2020-12-22
\What does D mean, what does {, 5} mean, \ [indicates what Here, I just want to remind you that in order to avoid the conflict with the reverse reference, when you use the ASCII code of octal as the symbol, please add 0 after \, that is to say, when the ASCII code is […]
-
Time:2020-12-21
Regular expression metacharacters and normal characters:According to the rules of regular expression syntax, the matching pattern of regular expression is composed of a series of characters. 1、 Normal characters: Most characters can only describe themselves. These characters are called ordinary characters, such as all letters and numbers.In other words, ordinary characters can only match the […]
-
Time:2020-12-19
About test codeThis article is not edited by Dreamweaver. The following test code may have made some adjustments in the process of assigning and pasting, which may fail. See the PDF version of this article. Matches the ending numberas Copy codeThe code is as follows: 30cac0040 was taken out3sfasdf92 take out 92 The regularity is […]