Skip to content

Conversation

@Nkasi-e
Copy link

@Nkasi-e Nkasi-e commented Apr 1, 2025

Overview
This update enhances the phone number regex to support a wider range of international formats, making it more robust for parsing phone numbers from resumes.

Updated the matchPhone regex

  • Previously, the regex only matched U.S. phone numbers (e.g., (123) 456-7890).
  • Now, it supports international numbers with country codes and different formatting styles.

Enhanced Test Cases
Added test cases for international formats like:

  • +1 123-456-7890 (USA)

  • +44 20 7946 0958 (UK)

  • +91-98765-43210 (India)

  • 0049 30 123456 (Germany)

The updated regex now correctly matches:

U.S. formats:

  • (123) 456-7890

  • 123-456-7890

  • 123.456.7890

International formats:

  • +1 123-456-7890

  • +44 20 7946 0958

  • +91-98765-43210

  • 0049 30 123456

Flexible separators:

  • Spaces (+1 123 456 7890)

  • Dashes (+1-123-456-7890)

  • Dots (+1.123.456.7890)

@vercel
Copy link

vercel bot commented Apr 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
open-resume ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2025 2:10pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant