What is the difference between ereg_replace and eregi_replace?
December 20th, 2007 | by Shubhabrata |ereg_replace — Replace regular expression
eregi_replace — Replace regular expression case insensitive
Share Your Experience
ereg_replace — Replace regular expression
eregi_replace — Replace regular expression case insensitive
7 Responses to “What is the difference between ereg_replace and eregi_replace?”
By Pooran Jaiswal on Aug 22, 2008 | Reply
This function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.
By brijmohan on Oct 7, 2008 | Reply
Good one question with answer !
By brijmohan on Oct 7, 2008 | Reply
Good interview question with answer !
By Jolly Martin on Jan 6, 2009 | Reply
Thanks for the answer.
please show this function with some example.
By hemant on Mar 1, 2009 | Reply
$nm = ‘4′;
$str = “This string has four words.”;
$str = ereg_replace(’four’, $nm, $str);
echo $str;
Output: ‘This string has 4 words.’
By nazia on Mar 27, 2009 | Reply
$str = ereg_replace(’four’, $nm, $str);
is this correct?
By KISHORE on Apr 2, 2009 | Reply
yes