Regular Expression functions in PHP ?

As we have discussed about the Regular Expression in previous topic , Before the string can be matched to regular expression ,The regular expression has to be created , Thus,

PHP have six function that works with the regular expressions. They always takes the regular expression as the first argument are as below.

ereg() 
  Thie most common regular expression ,ereg() allows searching a string for match with the regular expression(s).

 eregi()
  Performs exactly same as ereg() , but is case insensitive.

ereg_replace() 
Allows searching a string ror regular expression and than replace any occurrence of string with new string .

eregi_replace() 
 Has exactly same functionality as erg_replace() , but is case insensitive.

split() 
 Allows search string for regular expression and returns the matches as an arrays of string .

split() 
Performs exactly same as split() , but is case insensitive.

Regular Expression Basics

Symbols used In Regular Expressions 

Leave a Reply

Your email address will not be published.Required fields are marked *