• +91 9723535972
  • info@interviewmaterial.com

PHP Interview Questions and Answers

Question - How can we extract string "abc.com" from a string "mailto:info@abc.com?subject=Feedback" using regular expression of PHP?

Answer - $text = "mailto:info@abc.com?subject=Feedback"; preg_match('|.*@([^?]*)|', $text, $output); echo $output[1]; Note that the second index of $output, $output[1], gives the match, not the first one, $output[0].

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners