brijesh
How can we extract string 'roseindia.net ' from a string http:[email protected] net using regular expression of php?
1 Answer(s)      6 years and a month ago
Posted in : PHP

How can we extract string 'roseindia.net ' from a string http:[email protected] net using regular expression of php?

Ads

View Answers

November 15, 2010 at 3:39 PM


Hi,

Using the preg_match() function with "/.@(.)$/" as the regular expression pattern we can do it.

Example :

preg_match("/.*@(.*)$/","http:[email protected] net",$data);
echo $data[1];

Thanks










Related Tutorials/Questions & Answers:
Advertisements