in reply to regex to match URLs
You can also ignore the verification of URLs entirely, and just carry the assumption that you were given a proper URL as far as you can -- until something fails that actually wanted to do something practical with your URL.
If your program is interactive, and not just feeding a database, please consider this option. You'll need to gracefully recover from errors anyway, so why engage in duplicate efforts?
|
|---|