Archive for August 28th, 2010
preg (regular expression) to get emails in php
by z3n on Aug.28, 2010, under Coding
Problem:
A regular experssion pattern for getting emails on a random string.
Solution:
preg_match_all(
"/[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/i",
$string,
$matches,
PREG_PATTERN_ORDER
);