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
Is php outdated 2019?
What is ci in php?
what is variable scope, which variables are accessible from where and what are "undefined variable" errors?
Is strcmp case sensitive?
What are php magic methods/functions?
What is the php function that removes the first element of the array and returns it?
What is the major php security hole? How to avoid?
Why php 7 is faster?
Tell me is it possible to remove the html tags from data?
What are the differences between GET and POST methods in form submitting?
What is cookie and why do we use it?
What is var_dump function in php?
Which is better mysql or sql?
What is php and its uses?
Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?