I need a regular expression that validates all URL that starts with either (a1 can be caps or small). I know how to validate a URL but not sure how to add the constant to it. I am new to reg Ex.
Input:
www.a1.
http:// www.a1.
https:// www.a1.
http:// a1.
https:// a1.
a1.
and can have any number of trailing subdirectory. Ive written a sample code but that doesnt solve this. Please help. My code :
^(http:\/\/|https:\/\/)?(www.)?(a1|A1).([a-zA-Z0-9]+).?[a-zAZ0-9]*.[a-z]{3}.?([a-z]+)?$
It fails for my inputs.