(PHP 3, PHP 4, PHP 5)

eregi -- Case insensitive regular expression match


int eregi ( string pattern, string string [, array &regs] )

This function is identical to ereg() except that this ignores case distinction when matching alphabetic characters.

Example 1. eregi() example

= 'XYZ';
if (
eregi('z', $string)) {
"'$string' contains a 'z' or 'Z'!";

See also ereg(), ereg_replace(), eregi_replace(), stripos(), and stristr().

© Copyright 2003-2023 The ultimate PHP Editor and PHP IDE site.