我對URL這個正則表達式提高正則表達式的URL
"^(((https?|ftp|file|)://)|(www))[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]$"
幾乎所有我的測試場景的作品,除了一個
"www.foo" <---WRONG this url it's not valid for my system
"www.foo.com" <--- valid
"www.blah.net" <--- valid
"http://blah.com" <--- valid
"https://blah.com" <--- valid
是否有人可以幫助我提高我的正則表達式
什麼是您系統的有效tldns? –
'.com''.net''.com.ve''.org''.gob''.edu',那裏只有幾個,但可能更多 – Jorge