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 / ankush prasad
<?php
$string1="info@abc.com";
$string2=preg_match("/[a-c]+.[c-o]+/",$string1,$a);
print $a[0];
?>
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What does the unlink() function mean?
Is gender a dependent variable?
What is the purpose of the php empty function?
What is an associative array?
How can I convert ereg expressions to preg in php?
What is the w3c?
What do you mean by core php?
What language is similar to php?
What is namespace and use in php?
Explain how can we execute a php script using command line?
What is the difference between $name and $$name?
how to track user logged out or not? when a user is idle?
What is cookies? How to create cookies in php?
How to check if a string contains a character or word in php?
Php error constants and their descriptions