Skip to content

Commit d017556

Browse files
Copilotdevlux76
andcommitted
fix: use non-escaping dash position in email regex for ES2022 compatibility
Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
1 parent 90d4b22 commit d017556

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sharing/EligibilityClassifier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const PATTERNS: Array<{ reason: BlockReason; pattern: RegExp }> = [
5252
{
5353
reason: "pii_identity",
5454
// Email addresses (identity signal — may be PII)
55-
pattern: /\b[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.]+\.[a-zA-Z]{2,}\b/v,
55+
pattern: /\b[-a-zA-Z0-9._%+]+@[a-zA-Z0-9.]+\.[a-zA-Z]{2,}\b/i,
5656
},
5757
{
5858
reason: "pii_health",

0 commit comments

Comments
 (0)