Regular expression to check website URL

I need to check the web address, using regular expression.

if user type url as


i have a regular expression like


but it will only allow the second option only. how can i modify the regular expression so that , it should accept 1st and 3rd option too

This is a pretty basic expression for testing domain names:

@^(http\:\/\/|https\:\/\/)?([a-z0-9][a-z0-9\-]*\.)+[a-z0-9][a-z0-9\-]*[email protected]

Should match: