This code can be used to check if a url is valid or not and with some chances it can get url's from a text. ---- ====== set blabla {http://www.ietf.org/rfc/rfc3986.txt} if {[regexp -- {^(https?://[a-z0-9\-]+\.[a-z0-9\-\.]+(?:/|(?:/[a-zA-Z0-9!#\$%&'\*\+,\-\.:;=\?@\[\]_~]+)*)))$} $blabla match url]} { puts "$url is a valid url." } ====== ---- Let's test it and post the results here... PS: It doesn't work for IPv6 yet.