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 does isset() function?
How to execute an sql query?
How is it possible to propagate a session id?
Tell me how would you declare a function that receives one parameter name hello?
What is the difference server side and browser side validation?
How we can declare variable in php?
What is the meaning of a final class and a final method?
sort term descripttion form, report and uery
How to run the interactive php shell from the command line interface?
What is uniqid php?
What is difference between Method overriding and overloading in PHP?
How to convert numbers to strings in php?
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
what is variable scope, which variables are accessible from where and what are "undefined variable" errors?
What is php destruct?