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
How To Get the Uploaded File Information in the Receiving Script?
What is the purpose of constant() function?
Tell me what are the different types of errors in php?
What the use of var_dump()?
Can I use node js with php?
Difference between $message vs. $$Message in php.
What does the php error 'parse error in php - unexpected t_variable at line x' means?
Is not null mysql?
Does php need apache?
What is escape data in php?
Is runtime polymorphism overriding?
What is the special meaning of __sleep and __wakeup?
Which function can be used to delete a file?
What will the ?getdate() function returns in PHP?
What is a PHP accelerator?