How can we extract string 'abc.com' from a string
"http://info@abc.com" using regular expression of PHP

Answer Posted / sameer joshi

You can do like $site_array=explod("@","http://info@abc.com");
$site_addr=$sitr_array[1];

$site_addr will get the value as abc.com

Is This Answer Correct ?    13 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Xplain is it possible to use com component in php?

691


Which is better mysql or sql?

730


How to submit form without a submit button.

721


How to set cookies?

742


What is interface? Why it is used?

725


What is php date function?

800


How to convert a character to an ascii value?

727


How to count all the lines of code in a directory and sub folder?

686


What is singleton class in php?

716


What is 'float' property in css?

766


What are the Formatting and Printing Strings available in PHP?

771


What are constructor and destructor in PHP?

749


What is the difference between the functions strstr() and stristr()?

733


How do you execute a php script from the command line?

744


What is implode() in php?

790