September 2001
Intermediate to advanced
768 pages
32h 45m
English
string eregi_replace(string pattern, string replace, string subject)
| pattern | Regex pattern to match |
| replace | Replacement string |
| subject | String to search using the pattern |
Performs a non-case-sensitive POSIX regular expression match and replaces the matches in the subject with the specified replacement.
Returns:
Modified string if the pattern matched; unmodified string if not
Description:
This function works like ereg_replace() except for ignoring the case when matching alphabetic characters.
See also:
ereg_replace() preg_replace()
Example:
$string = "Best way to dispose of the Borg: Give them WINDOWS ME."; echo eregi_replace("(Windows[ ]*)(3.1|95|98|me|2000|nt)", '\1XP', ... |
Read now
Unlock full access