How can we extract string ‘abc.com ‘ from a string
info@abc.com" target="_blank">http://info@abc.com using
regular expression of php?

Answer Posted / simlu_irtt

$string1="info@abc.com";
$string2=split("@",$string1);
print_r($string2);

this code print the string as abc.com

Is This Answer Correct ?    23 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you use bcrypt for hashing passwords in php?

529


How long does a session last in php?

510


What is the tags in PHP is not a valid way to begin and end a PHP code block?

786


What are the disadvantages of php?

506


What is magic function in php?

533






Is numeric in php?

530


Which is correct about mysqli and pdo?

560


How do you count numbers in php?

494


What is php regular expression?

499


How many open modes available when a file open in PHP?

647


What does $this do in php?

522


What is php trait?

514


What is encapsulation in php?

556


How come the code works, but doesn’t for two-dimensional array of mine?

596


Is it more secure to use cookies to transfer session ids?

530