I have a string of this format that I need to verify:
H12345-001
Here the first character should be an alphabetical character followed by 5 digits, then a dash (-
), then two zeroes and finally a digit.
I am not sure if regex is right choice or can do it in a naive way of comparing each character. If regex is right way to go can someone point out to an example tutorials to use it. I am using C++03 (i.e. no C++11).