What is your actual goal, in terms of validation? Are you just trying to see if a piece of text contains a link, or multiple links? What are you testing for?
Aug 11, 2019
3
Level 3
Using RegEx validation rule
This might be a really silly question...
But I have the following regular expression that highlights any url in a block of text:
/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/igm
And i'm wondering how I'd use this as a validation rule - the ending /igm seems to be causing issues - but I need them as part of the rule.
Please or to participate in this conversation.