Cretezy / linkify

Low-level link (text, URLs, emails) parsing library in Dart
https://pub.dartlang.org/packages/linkify
MIT License
62 stars 50 forks source link

added support for phone, with option to provide its custom regex #3

Closed mannprerak2 closed 5 years ago

mannprerak2 commented 5 years ago

I have added support for phone numbers like +91 99999 99999 +1 123 123 123 +41 (555) 555 555 9999999999 , etc Regex is: ^((?:.|\n)*?)((tel:)?([+0-9]{2,4}?\s?[0-9\s()]{8,15}))

I have also added a way for user to provide a custom regex, in the linkify method using phoneRegex - which is an optional named parameter, so no breaking change is introduced