You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:emailRegex.test('[email protected]') returns false. Note that the local part has only 1 character. If I add a second character it works fine.
require("re2/package.json");// re2 is a peer dependency. varemailRegexSafe=require("email-regex-safe")letemailRegex=emailRegexSafe({exact: true,gmail: false})emailRegex.test('[email protected]')
The (?:[^\W_] part seems to be the culprit. Unfortunately, I don’t understand why it is not an issue if the local part of the email address has more than 1 character.
Describe the bug
I ran it on RunKit and on my local system:
Node.js version: 18.11 and 20.9
OS version: RunKit’s OS and Mac OS X
Description:
emailRegex.test('[email protected]')
returnsfalse
. Note that the local part has only 1 character. If I add a second character it works fine.Actual behavior
emailRegex.test('[email protected]')
returnsfalse
Expected behavior
emailRegex.test('[email protected]')
returnstrue
Code to reproduce
Run this code on RunKit
Checklist
The text was updated successfully, but these errors were encountered: