fix: update url regex

This commit is contained in:
minhtritc97 2025-06-05 09:33:31 +07:00 committed by JohnE
parent 43cb1b79cd
commit 1e2f5287cd
1 changed files with 1 additions and 1 deletions

View File

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