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
Is it possible multiple inheritance in php?
How do I expire a php session after 30 minutes?
What is difference between count or sizeof function in php?
Which is better wamp or xampp?
What is == and === in php?
Explain me what is the use of 'print' in php?
Php program to generate fibonacci series?
Tell me how can we define a variable accessible in functions of a php script?
What is the value for this auto incremented field user_pri_id?
What is ltrim?
How come the code works, but does not for two-dimensional array of mine?
What are some of the advanced features of php?
Is time a dependent variable?
What is the capacity of mysql database?
What are getters and setters php?