Simpel Posted March 5, 2018 Share Posted March 5, 2018 Hi. Then take: (?i)(?:https?:\/\/)?(?:www\.)?\K\S+\.\w{3}\/?[^\/\s,]+ Conrad youtuber 1 SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
youtuber Posted March 5, 2018 Author Share Posted March 5, 2018 Thank you @Simpel I need another affair Which one is better for you to verify a url address without any restrictions? (http[s]?:\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?) or (http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))? Link to comment Share on other sites More sharing options...
Simpel Posted March 5, 2018 Share Posted March 5, 2018 Did you change your mind? With both regex your url must have http:// or https://. And with both regex it will include www into the result if available. SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
youtuber Posted March 5, 2018 Author Share Posted March 5, 2018 (edited) Ok thank you sample regex no problem. I mean to say this question. How do I validate my all url regex? (http[s]?:\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?) Edited March 5, 2018 by youtuber Link to comment Share on other sites More sharing options...
Simpel Posted March 5, 2018 Share Posted March 5, 2018 This is what I look inside: https://mathiasbynens.be/demo/url-regex There I look, what is important for me and what not in my special case. You have to decide by your own, I guess. By the way google "regex url" showed me this as first match. SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
youtuber Posted March 5, 2018 Author Share Posted March 5, 2018 (edited) a url is the full url to extract it https://regex101.com/r/1WDPj2/1 Edited March 5, 2018 by youtuber Link to comment Share on other sites More sharing options...
Simpel Posted March 6, 2018 Share Posted March 6, 2018 For full url match actually I would take this: (?mi)^(?:https?:\/\/)[^\s\/$.?#].[^\s]*$ youtuber 1 SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now