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

How can you get web browser’s details using PHP?

522


What is difference between sql and php?

550


what is the scope of php in the future if any other language is developed then may be php is loss ???

13896


What is php sequence?

531


Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?

531






Can php run without apache?

545


What is difference between variable declaration and variable definition?

503


what are the differences between php and perl

1609


How can we display information of a variable and readable by human with php?

571


What is the difference between runtime exception and compile time exception?

543


How to concatenate two strings in php?

538


What is the difference between "echo" and "print" in php?

520


Why do you need php?

525


What is psr in php?

613


How to break a file path name into parts?

538