support utf-8 languages for hashTag and userTag (#17)

This commit is contained in:
minhtritc97 2024-05-29 16:45:47 +07:00 committed by GitHub
parent 4feb8a26c6
commit 9dbaa08a7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -6,9 +6,9 @@ import 'package:linkfy_text/src/enum.dart';
String urlRegExp = String urlRegExp =
r'((https?://)?(www\.)?[a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*))'; r'((https?://)?(www\.)?[a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*))';
String hashtagRegExp = r'(#+[a-zA-Z0-9(_)]{1,})'; String hashtagRegExp = r'#[a-zA-Z\u00C0-\u01B4\w_\u1EA0-\u1EF9!$%^&]{1,}(?=\s|$)';
String userTagRegExp = r'(?<![\w@])@([\w@]+(?:[.!][\w@]+)*)'; String userTagRegExp = r'@[a-zA-Z\u00C0-\u01B4\w_\u1EA0-\u1EF9!$%^&]{1,}(?=\s|$)';
String phoneRegExp = String phoneRegExp =
r'\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*'; r'\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*';
String emailRegExp = String emailRegExp =