Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function isPhoneNumber regex #1

Closed
ngmisl opened this issue Oct 4, 2023 · 1 comment · May be fixed by #4
Closed

function isPhoneNumber regex #1

ngmisl opened this issue Oct 4, 2023 · 1 comment · May be fixed by #4
Assignees

Comments

@ngmisl
Copy link

ngmisl commented Oct 4, 2023

Tried the extension, but it seems to have very weak phone number recognition, here's some recommendation (by GPT4)

const phoneRegex = /((\+|00)(\d{1,3}))?[-.\s]?(\()?(\d{1,4})(?(4)\))[-.\s]?(\d{1,4})[-.\s]?(\d{4,7})/g;

This regex pattern will detect phone numbers in the following formats:

  • +1 (123) 456-7890
  • +1-123-456-7890
  • +1.123.456.7890
  • +1 123 456 7890
  • 123-456-7890
  • 123.456.7890
  • 123 456 7890
  • (123) 456-7890
  • 00123 456 7890
  • 00123-456-7890
  • 00123.456.7890
  • 00(123) 456-7890
@santiaago
Copy link

Thanks for the issue, we'll see if we can handle this in the coming month.

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 a pull request may close this issue.

3 participants