a more comprehensive set of PHP tutorials , basic video and some small combat projects, below is the video directoryCD-ROM (i) \php employment Class (I.)CD-ROM (i) \php Technical exchange zone. URLCD-ROM (i) \ "Wisdom Special issue" belongs to it
Modifier is an important reference to the regular expression in PHP, let me turn to you about the PHP expression pattern modifier in detail, there is a need to know the friend can enter the reference.
The PHP pattern modifier, also known as the
Parse regular expressions and pattern matching in PHP. In PHP, two methods are provided for regular expression processing text. one is PCRE (the PCRE library implements a slightly different syntax and semantics from perl5 (see below) the regular
The String method that matches the regular expression pattern. The regular expression is string.
In JavaScript code, regular expressions are used for pattern matching. Some methods of String objects and RegExp objects are often used, such as replace,
All along, think of their regular expression of the study can be (basic work encountered problems can be solved), but sometimes it is not know its why, in the Internet to see this article, explained before a lot of questions, record down, at any
There are two ways to handle regular text in PHP, one is the pcre approach (the Pcre library is a set of functions that implements a regular expression pattern matching feature that is slightly different from the syntax and semantics of Perl 5 (see
1. preg_match-performs a regular expression matchint Preg_match (string $pattern, String $subject [, Array & $matches [, int $flags = 0 [, int $offset = 0]])
Searches for a match between the subject and the regular expression given by the
I (pcre_caseless)If this modifier is set , the letters in the pattern are case insensitive and match . m (pcre_multiline)By default, pcre that the target string is made up of one-line characters(However, it may actually contain multiple lines),
Preg_match--Perform regular expression matching. And only once, note the difference with the Preg_match_all.
IntPreg_match(string pattern, string subject [, array matches [, int flags]]) inSubjecT search in the string withpatternMatches the
1. preg_match-execution of a regular expression matchint Preg_match (string $pattern, String $subject [, Array & $matches [, int $flags = 0 [, int $offset = 0]]]
Searches for a match between the subject and the regular expression given by
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.