libphonenumber-js icon indicating copy to clipboard operation
libphonenumber-js copied to clipboard

Find phone numbers in text doesn't work if fr and us are mixed

Open fstn opened this issue 11 months ago • 1 comments

Got o the demo https://catamphetamine.gitlab.io/libphonenumber-js/?parseCountry=US&parseValue=213-373-4253&asYouTypeCountry=US&findNumbersCountry=US&findNumbersText=My%20phone%20number%20is%20%2B1%20123-456-7890%20and%20my%20other%20number%20is%20%2B33%201%2023%2045%2067%2089 and search number for:

My phone number is +1 123-456-7890 and my other number is +33 1 23 45 67 89

Result will be: Phone numbers found: 1 My phone number is +1 123-456-7890 and my other number is +33 1 23 45 67 89 Number: +33123456789, Country: FR, Starts at: 58, Ends at: 75

fstn avatar Mar 01 '24 04:03 fstn

Most likely “+1 123-456-7890” is not a valid one

On Fri, 1 Mar 2024 at 07:27, fstn @.***> wrote:

Got o the demo https://catamphetamine.gitlab.io/libphonenumber-js/?parseCountry=US&parseValue=213-373-4253&asYouTypeCountry=US&findNumbersCountry=US&findNumbersText=My%20phone%20number%20is%20%2B1%20123-456-7890%20and%20my%20other%20number%20is%20%2B33%201%2023%2045%2067%2089 and search number for:

My phone number is +1 123-456-7890 and my other number is +33 1 23 45 67 89

Result will be: Phone numbers found: 1 My phone number is +1 123-456-7890 and my other number is +33 1 23 45 67 89 Number: +33123456789, Country: FR, Starts at: 58, Ends at: 75

— Reply to this email directly, view it on GitHub https://github.com/catamphetamine/libphonenumber-js/issues/459, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADUP37O4HBAHUHA64LLYJLYV77RNAVCNFSM6AAAAABEBDM7LCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3DENJYGAZTOMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

catamphetamine avatar Mar 01 '24 06:03 catamphetamine