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 is $_ get?
How to pass variables and data from php to javascript?
How to support multiple-page forms?
Is python easier than php?
What websites use php?
What are html entities?
What is the correct php command to use to catch any error messages within the code?
How many escape sequences are recognized in double-quoted strings in php?
What type of operation is needed when passing values through a form or an url?
Why do we use csrf token?
What are differences between PECL and PEAR?
Define about declare construct?
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
How to write comment in php?
What does the php error 'parse error in php - unexpected t_variable at line x' means?