extract-email-address
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -15,3 +15,4 @@ "use strict"; | ||
var _default = input => { | ||
return input.replace(emojiRegex, ' ').replace(/(?<=\s|^)([a-z0-9.-_@])\s?(?=[a-z0-9.-_@](?:\s|$))/g, '$1').replace(/\s+at\s+/g, '@').replace(/\s+dot\s+/g, '.').replace(/\s*<at>\s*/g, '@').replace(/\s*<dot>\s*/g, '.').replace(/\s*\(at\)\s*/g, '@').replace(/\s*\(dot\)\s*/g, '.').replace(/\s*\[at\]\s*/g, '@').replace(/\s*\[dot\]\s*/g, '.').trim(); | ||
return input.replace(emojiRegex, ' ').replace(/(?<=\s|^)([a-z0-9.-_@])\s?(?=[a-z0-9.-_@](?:\s|$))/g, '$1').replace(/\s+at\s+/g, '@').replace(/\s+dot\s+/g, '.').replace(/\s*<at>\s*/g, '@').replace(/\s*<dot>\s*/g, '.').replace(/\s*\(at\)\s*/g, '@').replace(/\s*\(dot\)\s*/g, '.').replace(/\s*\[at\]\s*/g, '@').replace(/\s*\[dot\]\s*/g, '.') // Matches all ASCII characters from the space to tilde. | ||
.replace(/[^ -~]/g, ' ').trim(); | ||
}; | ||
@@ -18,0 +19,0 @@ |
@@ -87,3 +87,3 @@ { | ||
}, | ||
"version": "1.2.0" | ||
"version": "1.3.0" | ||
} |
@@ -50,2 +50,5 @@ <a name="extract-email-address"></a> | ||
extractEmail('extracts emails surrounded by odd unicode characters, e.g. 邮箱:gajus@gajus.com'); | ||
// [{email: 'gajus@gajus.com'}] | ||
extractEmail('extracts emails surrounded by emojis, e.g. 📧gajus@gajus.com'); | ||
@@ -52,0 +55,0 @@ // [{email: 'gajus@gajus.com'}] |
@@ -19,3 +19,6 @@ // @flow | ||
.replace(/\s*\[dot\]\s*/g, '.') | ||
// Matches all ASCII characters from the space to tilde. | ||
.replace(/[^ -~]/g, ' ') | ||
.trim(); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15869
120
77