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
How can we automatically escape incoming data?
Which is better php or wordpress?
Explain me what is the w3c?
What is php trait?
What is the use of array_search() in php?
How to set cookies?
How do I escape data before storing it into the database?
When do you use define() and when do you use const. What are the main differences between those two?
How should a model be structured in mvc?
What is delimiter php?
What is the delimiter syntax is PHP's default delimiter syntax
How can I prevent sql-injection in php?
How to find length of an array in php ?
What are the features and advantages of object-oriented programming in php?
Which array function checks if the particular key exists in the array?