Write a regular expression to get the value xxx from the
string 'xxx@yyy.com'

Answer Posted / esorimer

preg_replace("/(.*)@(.*)/","\1",$string);

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is isset function in php?

756


How to send a cookie to the browser?

714


How does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?

663


How to get complete current page url in php?

741


What is the best php version for wordpress?

686






What is apache and php?

643


What is meant by pear in php? What is the purpose of it?

676


What is the difference between php and javascript?

736


Why sessions are used in php?

663


How to delete an element from an array?

736


How many functions are there in php?

691


What are the advantages and disadvantages of cascade style sheets?

829


What are the methods useful for method overloading?

681


What are html entities?

664


What are the 5 types of data?

708