How can we extract string 'abc.com' from a string
"http://info@abc.com" using regular expression of PHP
Answer Posted / rachana
We can use the preg_match() function with "/.*@(.*)$/" as
the regular expression pattern. For example:
preg_match("/.*@(.*)$/","http://info@abc.com",$data);
echo $data[1];
| Is This Answer Correct ? | 49 Yes | 2 No |
Post New Answer View All Answers
Whether it is possible to share a single instance of a memcache between multiple php projects?
What is difference between md5 and SHA256?
How to call a php function from html button?
Can age be a variable?
What is interface? Why it is used?
What is php and sql used for?
How to avoid the undefined index error?
How can we submit from without a submit button?
Do while loops?
Is php coding easy?
How to create a mysql connection in php?
Explain Whitespace Characters?
How to make a class in php?
How is it possible to know the number of rows returned in result set?
Suppose your zend engine supports the mode ?> Then how can you configure your php zend engine to support Mode ?