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

Autolinker not working for 06 dutch mobile phone numbers #293

Open
Simbaclaws opened this issue Oct 10, 2019 · 0 comments
Open

Autolinker not working for 06 dutch mobile phone numbers #293

Simbaclaws opened this issue Oct 10, 2019 · 0 comments

Comments

@Simbaclaws
Copy link

Simbaclaws commented Oct 10, 2019

Apparently the autolinker doesn't match any phone numbers listed like this:

06-12345678 or 06 12 34 56 78 or 06 12345678

I have tested the following scenario's:
+316-12345678 +361 12345678 31612345678 316 12345678 316-12345678 +0612345678 +06-12345678 +06 12345678 0612345678 06-12345678 06 12345678

None of these work.

+31612345678 is the only one that seems to work.

by the way, + in front of 06 is wrong, so is 316 without +. In the netherlands it's either +316 or 06 with 8 numbers behind it. I just wanted to test these in case it did pick it up incorrectly.

Notation can differ, some people tend to write 06-12345678 while others would write it as 06 12 34 56 78, while others write 06 12345678.

I would like to see support for these types of dutch phonenumbers.
Take a look here for a regular expression that could possibly do the job: https://regexr.com/3aevr

For now my current solution in my usecase is creating a regular expression in my backend to alter the format to work with +31612345678.

I've already tried adding this functionality myself for this module but I couldn't find a way of altering the recognition of the phone number. The replacefn is only meant to change the output, not necessarily the recognition function.

Perhaps it's a good idea to allow people to put in custom recognition function replacements as well, in case their usecase varies. Or the recognition function should work for every type of phone number, e-mail address, url etc around the globe.

This could just be scratching the surface for specific countries.

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

No branches or pull requests

1 participant