You are not logged in.

#1 2009-11-08 03:34:07

fflarex
Member
Registered: 2007-09-15
Posts: 466

very easy question (probably) about validating URLs...

I need a program or script that checks if a string could be a valid URL and then exits with either a zero or non-zero status based on what it finds (for use in a pipeline). It should also handle "sloppy" URLs with no http included, etc. I know there's probably a simple tool I'm not recalling, or an easy perl solution. Help?

Offline

#2 2009-11-08 03:47:39

tomd123
Developer
Registered: 2008-08-12
Posts: 565

Re: very easy question (probably) about validating URLs...

Offline

#3 2009-11-08 04:40:23

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: very easy question (probably) about validating URLs...

Thanks. I was really having a huge brain fart. I realized that grep is exactly what I was looking for (doh!), so I just googled for a good URL regex.

Offline

Board footer

Powered by FluxBB