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 / rajan vardawaj
We can use the preg_match() function with “/.*@(.*)$/” as
the regular expression pattern. For example:
preg_match(”/.*@(.*)$/”,”info@abc.com”,$data"
target="_blank">http://info@abc.com”,$data); echo $data[1];
Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
What are the advantages of stored procedures in php?
What is the difference between runtime exception and compile time exception?
What is cms php?
Explain me what is the use of header() function in php?
How to run a php script?
How can image properties be retrieved in php?
Is php 7.0 stable?
How to access standard error stream in PHP?
Is age interval or ordinal data?
Write a program in php to find the occurrence of a word in a string?
Is php a web server?
What is php compared to html?
Tell me is it possible to submit a form with a dedicated button?
What is the use of addslashes in php?
Is multiple inheritance supported in php?