Tag: regular expressions

  • E-mail extraction from an Outlook copied string

    E-mail extraction from an Outlook copied string

    Sometimes you need to extract an e-mail address from a format like this: Name Surname <[email protected]> In such cases use this function: /** * Extract mail address from a string * * @param string $emailString * @return mixed match on success, false on error */ function extractEmail( $emailString ) { /** @var string $result **/ […]