/(? A>) what does the php regular expression in/iU mean? Solution

Source: Internet
Author: User
Tags php regular expression
/(?!. * A & gt;)/iU what does the php regular expression mean? /(?!. * A & gt;) what does the php regular expression in/iU mean ?, & Nbsp ;(?! Pattern) & nbsp; a negative pre-query that matches the search string at the beginning of any string that does not match & nbsp; pattern & nbsp. This is a non-get /(?!. * A>) what does the php regular expression in/iU mean?
/(?!. * A>) what does the php regular expression in/iU mean?
------ Solution --------------------
(?! Pattern) negative pre-query: matches the search string at the beginning of any string that does not match pattern. This is a non-get match, that is, the match does not need to be obtained for future use.


------ Solution --------------------
(?! Pattern) is a forward negative pre-query that matches the search string at the beginning of any string that does not match pattern. This is a non-get match, that is, the match does not need to be obtained for future use. For example, "Windows (?! 95
------ Solution --------------------
98
------ Solution --------------------
NT
------ Solution --------------------
2000) "can match" Windows "in" Windows3.1 ", but cannot match" Windows "in" Windows2000 ". Pre-query does not consume characters. that is to say, after a match occurs, the next matching search starts immediately after the last match, instead of starting after the pre-query characters.

I (PCRE_CASELESS)
If this modifier is set, the expression is case-insensitive.

U (PCRE_UNGREEDY)
This modifier is used to flip the number of "greediness" so that greedy is disabled by default. However, if you follow the question mark (?), You can use greedy. this is incompatible with Perl. This can also be done through (? U) modifier to get.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.