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

  1. 7 Responses to “What is the difference between ereg_replace and eregi_replace?”

  2. 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.

  3. By brijmohan on Oct 7, 2008 | Reply

    Good one question with answer !

  4. By brijmohan on Oct 7, 2008 | Reply

    Good interview question with answer !

  5. By Jolly Martin on Jan 6, 2009 | Reply

    Thanks for the answer.
    please show this function with some example.

  6. 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.’

  7. By nazia on Mar 27, 2009 | Reply

    $str = ereg_replace(’four’, $nm, $str);

    is this correct?

  8. By KISHORE on Apr 2, 2009 | Reply

    yes

Post a Comment