When I am doing some programing, I may need the Regular Expression rule to validate the data user submit.
It is used to protect the program and save the resource of server.
To write a perfect Regular Expression Rule is not easy. You need try and try, test and test.
Until I found this site , Regular Expression Library.
I choose this one to test the URL user entered.
It works well.
Regular Expression Library has lots of expression. You always can find one suitable for your needs.