We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5df5548 commit eb33a63Copy full SHA for eb33a63
src/getOnlyEmail.ts
@@ -49,7 +49,7 @@ function getOnlyEmail(
49
}: OptionsParams = defaultOptionsParams,
50
): string | string[] {
51
const emailPattern: RegExp =
52
- /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g;
+ /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
53
54
const matches: string | string[] | null = text.match(emailPattern);
55
0 commit comments