fix: update url regex

This commit is contained in:
minhtritc97 2025-06-05 09:33:31 +07:00 committed by JohnE
parent ddf4ca932a
commit 4e385d9cd4
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
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 = r'#[a-zA-Z\u00C0-\u01B4\w_\u1EA0-\u1EF9!$%^&]{1,}(?=\s|$)';