I want to create a regular expression for subdomain like:
In the textbox user need to enter like
abc1.test.com
or
abc1s.test.com
Note: .test.com is always required at the end.
The variable part can contain any letter, alphabets etc
I dont know anything about regex so i ask this silly question. I googled it for more than 2 hours but dont find any good example.
Please note this is not a homework.
Any help is highly appreciated.
There are a number of useful resources on regex online, including:
I am sure other members will have better resources but these have sufficed for me in the past.
The following regex should work for you: