I have an HTML form field $_POST["url"], having some URL strings as the value.
Example values are:
https://example.com/test/[email protected] https://example.com/test/[email protected] https://example.com/test/[email protected] https://example.com/test/[email protected]&testin=123 https://example.com/test/the-page-here/[email protected]
etc.
How can I get only the email parameter from these URLs/values?
Please note that I am not getting these strings from the browser address bar.
/(email=\w\@\w\.\w)/or more advanced matching techniques. Just giving you the idea. Seepreg_matchfunction: php.net/manual/en/function.preg-match.php