$body = '
Yunnan Kaiyuan Railway Office from together
Recently, is trying to find children's biological parents. If you recognize the children in the video, please contact Kaiyuan Railway Public Security Office: 0873-3132158.
A few days
The following is what the string might appear
$string = "Ling Son" return to the present 70 yuan ";
$string = "There may be words in front of" spirit son "return to cash 70 yuan";
$string = "may be in the middle bracket [Spirit son] return 70 yuan";
Solve, thank you.
Reply to discussion (solution)
Old, Donald, and so on, can't pass the old word.The rules are: $pre = '/old/';Preg_match returns the number of matches to 0 or 1, which only performs a match once'/[\'\"\ \ ]/'This rule is to
Excuse me, the address is similar to the following
Http://localhost/info.html\ "
Would like to filter out the multiple input \ "
Rewriterule ^info.html (. *) $ member_info.php
Rewriterule ^info.html\\\ "$ member_info.php
All match failed, excuse
Regular Expression Matching content in & lt; script & gt; & lt;/script & gt. The content contains the content in & lt; script & gt; & lt;/script & gt; that matches the regular expression of any character. The content includes blank spaces and any
A page has a lot of Weibo a Weibo there are many layers of div I want to get the data for each of the two div's in the microblog:
Text content
These two div's are siblings.
I'm going to catch the contents of class=content and the IMG
Regular PHP
if (Preg_match ("^[a-za-z][a-za-z0-9_\-]{5,19}$", "abc-mmm"))
echo "true";
else echo "false";
?>
Want to verify the regular expression of the account, the beginning of the letter, allow numbers, letters, underscores, minus, 6-20
Regular numbers
① $number = 1234784;
The regular matching result is: 1234
② $number = 389456723;
The regular matching result is: 4567
Reply to discussion (solution)
No sequential numbers can be matched only with regular
No sequential numbers
1. Filter blank characters in the string. You can remove blank characters such as tab and press Enter.
Str. replaceall ("\ s + ","");
2. Filter Chinese Punctuation Marks
STR = Str. replaceall ("(? [^ A-zA-Z0-9 \ u4e00-\ u9fa5] "," ");
3.
How the regular matches the first one.
And the last one
such as the article below
1111111
2222222
33333333
4444444
55555555
66666666
7777777
Match out
1111111In the
And the last paragraph
7777777Of
How do you get it?
Share to:
Regular matching in the provincial urban areaPreg_match ('/(. *? Province | Autonomous Region | beijing | Tianjin city) + (. *? City | prefecture | region | division | county)) + (. *? District | county | town | township | street))/', $address,
The examples in this article describe the way JavaScript uses regexp to make regular matches. Share to everyone for your reference. The implementation method is as follows:
The wants this article to help you with your JavaScript
The Nginx server searches multiple location blocks in the server block for a standard URI and a request string match, and if there are multiple matches, record the one with the highest matching degree. The server then matches the regular URI in the
The matching rule cannot be used for "/."
Source code Example:Copy the Code code as follows:
Header ("Content-type:text/html;charset=utf-8");$str = 'Test PHP regular match out JS code test PHP regular match out JS code test PHP regular match out
Matching rules can not be used "/.Source code Example:.The code is as follows:Header ("Content-type:text/html;charset=utf-8");$str = ' Test PHP regular match out JS code test PHP regular match out JS code test PHP regular match out JS code test PHP
The matching rule cannot be used for "/."
Source code Example:Copy the Code code as follows:
Header ("Content-type:text/html;charset=utf-8");$str = 'Test PHP regular match out JS code test PHP regular match out JS code test PHP regular match out
Recently encountered a problem in the project, is the need to use regular matching some of the suspected dark chain and hanging horse HTML code, and the company's boss to the regular expression of some place is not rigorous enough, resulting in a
In this article, I will introduce nginx about location processing, we all know nginx configuration file There will be a lot of location,nginx configuration instructions can be divided into the scope of main,server,location these 3 species, In fact,
Syntax rules for location-matching URLs:Location [=|~|~*|^~]/uri/{...}= indicates exact match~ Indicates a case-sensitive regular match^~ represents a URL that begins with a regular string;~* indicates a regular match that does not differentiate
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.