regex url validator?

Bob Sneidar bobsneidar at iotecdigital.com
Tue Oct 23 11:12:21 EDT 2018


I think the usability of regex for day to day programming can be stated as directly proportional to the percentage of professional software developers (the ones who *actually* make money at it) who could have come up with that regex string purely on their own. 

Bob S


> On Oct 23, 2018, at 06:26 , Stephen MacLean via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> put "^(?:http://|https://|ftp://|ftps://|nntp://|news://)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]-*)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]-*)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$" into tURLRegex





More information about the use-livecode mailing list