T
Tony Johansson
Hello!
I want to use regular expression to define an Id with the following format.
It's an Id number for an animal which should start with a capital letter,
followed by unknown number of letters and spaces, and then end with at least
one digit.
This regular expression seems to work when I have made some testing but is
it correct.
bool status = Regex.IsMatch(input, @"^[A-Z]+[a-zA-Z ]*\d+$");
//Tony
I want to use regular expression to define an Id with the following format.
It's an Id number for an animal which should start with a capital letter,
followed by unknown number of letters and spaces, and then end with at least
one digit.
This regular expression seems to work when I have made some testing but is
it correct.
bool status = Regex.IsMatch(input, @"^[A-Z]+[a-zA-Z ]*\d+$");
//Tony