• +91 9723535972
  • info@interviewmaterial.com

PHP Interview Questions and Answers

Question - How can we extract string 'abc.com ' from a string http://info@abc.com using regular expression of php?

Answer -  We can use the preg_match() function with "/.*@(.*)$/" as the regular expression pattern. For example: preg_match("/.*@(.*)$/","http://info@abc.com",$data); echo $data[1];

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners