Analyzes the regular expression Ereg in PHP. We know that Perl is compatible with regular expressions in PHP. what do we need to know about Ereg regular expressions? Here, we use the difference analysis between Perl-compatible regular expressions
We know Perl-compatible regular expressions in PHP, so what do we need to know about Ereg regular expressions? Here we introduce you to the Ereg regular expressions by using Perl-compatible regular expressions and perl/ereg differential analysis,
We know that Perl is compatible with regular expressions in PHP. What do we need to know about Ereg regular expressions? Here we will introduce Ereg regular expressions to you through the Difference Analysis Between Perl-Compatible Regular
The comparison between POSIX and Perl-compatible regular expressions (preg_match, preg_replace, ereg, and ereg_replace). For more information, see. First, let's take a look at the two main functions of POSIX-style regular expressions:
Ereg function:
First look at the two main functions of the POSIX-style regular expression:
Ereg function: (Regular expression match)
Format: int ereg (string pattern, string string [, array ®s])
Note: the Preg_match () function that uses Perl-compatible
First, let's take a look at the two main functions of POSIX-style Regular Expressions:
Ereg function: (Regular Expression matching)
Format: int ereg (string pattern, string [, array & regs])Note: The preg_match () function using Perl
Ereg ()Ereg_replace ()Eregi ()Eregi_replace ()Split ()(1) Ereg,eregiThis is a regular expression matching function, the former is case-insensitive, and the latter is irrelevant.Usage:Ereg (regular expression, string, [match part array name]);Regular
After PHP is upgraded to 5.3,ProgramThe error "function split () is deprecated" is returned.This is because of various reasons (mainly for the reason of regular expressions, see below for details). The split function is not supported in the new
PHP string regular expression replacement function preg_replace. Syntax: mixedpreg_replace (mixedpattern, mixedreplacement, mixedsubject); return value: mixed type data function type: data processing content description: This function uses pattern
Syntax: Mixed preg_replace (mixed pattern, mixed replacement, mixed subject);
Return value: Mixed type data
Function type: Data processing
Description: This function parses the subject string with the rule of pattern, and the string to be replaced
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.