Skip to content

Commit

Permalink
fix email matching in case of email not existing
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
  • Loading branch information
Pierre Tardy committed Nov 6, 2015
1 parent 15b2392 commit 4773144
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -74,4 +74,7 @@ class DataUtils extends Service
if not angular.isString(string)
throw new TypeError("Parameter 'string' must be a string, not #{typeof string}")
emailRegex = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/
emailRegex.exec(string).pop() or ''
try
emailRegex.exec(string).pop() or ''
catch
''

0 comments on commit 4773144

Please sign in to comment.