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

Answer Posted / nitesh kumar

you can use explode funciton

echo $site_array=end(explode("@","http://info@abc.com"));

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you compare strings in java?

517


What is the interface in php?

536


How to find length of an array in php ?

557


What type of operation is needed when passing values through a form or an url?

532


What is php crud api?

505






How can we calculate the similarity between two strings?

578


What does the unlink() function means?

546


How to access standard error stream in PHP?

589


Do you know what is the function func_num_args() used for?

567


How to include a file to a PHP page?

590


What is difference between include,require,include_once and require_once()?

530


Which functions are used to count the total number of array elements in php?

539


Is gender a dependent variable?

512


What is string and its function?

515


Tell me how to find the position of the first occurrence of a substring in a string?

493