Here is a short regexp that is used to validate whether a user has entered correct URL address. Might be useful in any scripts dealing with user data.
I will show it as PHP code:
It will check whether url suits the pattern. May not be ideal, but it’s working. :)