Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
/_^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!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]*)?$_iuS/
The dude who came with this solution must be in an hospital somewhere. -
@D--M sftp is like ftp but via ssh. Like a scp but FileZilla can handle it and connect through the 22 port.
-
@fastidio I googled the last 3 words in your question, and clicked the 3rd or 4th link, that almost has the same question word to word :D
-
fastidio5436y@Drillan767 I've searched this many times, but all answers have errores.
This is the best approach:
https://mathiasbynens.be/demo/... -
@fastidio Fun fact : the long ass answer I gave you is a copy/paste of the last regex given (502 chars) :D
-
fastidio5436y@Drillan767 haha, look at @scoottgonzales's answer, 1347 characters 😵 I think it's the best solution.
Related Rants
So... Has anyone already found the perfect URL validation regex?
rant
question
regex