I have a regular expression that I am using to validate Urls. I got this regular expression somewhere when my previous one didn't work.
However, when some Urls are entered then submitting the page kills the entire web server. I tested on oter sites like this regular expression tester site:
and it dies too.
Here is a Url that works:
and a Url that dies:
Notice the only difference is the ref part at the end of the amazon link.
Here is the regular expression being used in .NET validators:
The issue is that a user of the site will most likely copy a Url from another location (Amazon being a big place) and we don't want the user to have to know to remove the part after the last slash (where Amazon tracks how you hit that specific product).
Any help on how to fix or even a new regular expression would be fine. It needs to validate any valid Url for websites and images, http or https (ftp, etc. is not needed).