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 type of headers that PHP supports?
Is rent a variable cost?
What is trait in php?
Tell me when a conditional statement is ended with an endif?
Does php require a web server?
How error handling is being handled by php?
Is numeric in php?
What is a simple php method to make a cross domain data request?
What is a persistent cookie in php?
What is meant by PEAR in PHP?
Explain which cryptographic extension provide generation and verification of digital signatures?
Suppose your zend engine supports the mode Then how can you configure your php zend engine to support Mode ?
How does php work?
How many keywords are there in php?
What does namespace mean in php?