Ereg ()
Ereg_replace ()
Eregi ()
Eregi_replace ()
Split ()
(1) Ereg,eregi
This 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 expressions in PHP3.0 are generally similar to those used in grep.
(2) Ereg_replace,eregi_replace
These are replacement functions.
Usage:
Ereg_replace (Regular expression, substitution string, original string);
A strtr in the string handler is a "translation" function, similar to the tr/.../.../in Perl,
Usage:
STRTR (String, "from", "to");
For example:
STRTR ("Aaabb", "AB", "CD") returns to "CCCDD".
(3) Split
It's similar to the explode function, but this time you can split the string at a place that matches a regular expression.
Usage:
Split (regular expression, string, [number of items taken out before]);