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('a@abc.de') returns false. Note that the local part has only 1 character. If I add a second character it works fine.
Actual behavior
emailRegex.test('a@abc.de') returns false
Expected behavior
emailRegex.test('a@abc.de') returns true
Code to reproduce
require("re2/package.json");// re2 is a peer dependency. varemailRegexSafe=require("email-regex-safe")letemailRegex=emailRegexSafe({exact: true,gmail: false})emailRegex.test('a@abc.de')
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('a@abc.de')
returnsfalse
. Note that the local part has only 1 character. If I add a second character it works fine.Actual behavior
emailRegex.test('a@abc.de')
returnsfalse
Expected behavior
emailRegex.test('a@abc.de')
returnstrue
Code to reproduce
Run this code on RunKit
Checklist
The text was updated successfully, but these errors were encountered: