InterviewSolution
Saved Bookmarks
| 1. |
How Can We Extract String "wisdomjobs.com" From A String "mailto:info@wisdomjobs.com?subject=feedback" Using Regular Expression Of Php? |
|
Answer» ANSWER : $text = “MAILTO:info@wisdomjobs.com.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]. Note that the second index of $output, $output[1], gives the match, not the first one, $output[0]. |
|