flutter_linkify icon indicating copy to clipboard operation
flutter_linkify copied to clipboard

Is there a way to detect links with commas?

Open Mounix99 opened this issue 1 year ago • 1 comments

I have the link with comma and I can't figure out what should be the RegEx for this type of links. Does anyone know ? link example: https://morecup.cups.nu/2024,nb/result/team/49286854 regEx for modifying: r'^(.?)((?:https?://|www.)[^\s/$.?#].[^\s])'

Mounix99 avatar Apr 25 '24 14:04 Mounix99

For anyone who will struggle from the same problem, here is a RegEx for such types of links

RegExp(
  r'^(.*?)((?:https?:\/\/|www\.)[^\s/$.?#].\S+,+\S*)',
  caseSensitive: false,
  dotAll: true,
)

Mounix99 avatar Apr 30 '24 06:04 Mounix99