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
Explain Constant in Class?
Is php faster than nodejs?
can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????
What is php and how do you use it?
Is overloading possible in php?
Do you know how to enable error reporting in php?
How to find a specific value in an array?
Which operator is used to concatenate two strings in PHP?
Write the statements that are used to connect php with mysql
Tell me what are sql injections, how do you prevent them and what are the best practices?
What is whitespace in php?
What does $_server mean?
CWD is a type of shell variable. State Whether True or False?
What is the use of htmlentities in php?
How does csrf attack work?