I am writing some javascript to validate user input in a text area. Here are the requirements for input format:
- Input must be in the format of two hex values separated by a space (i.e. A7 B3 9D).
- Input must be valid hex values.
I have requirement #2 sorted out with a regExpression valueOne.match("[0-9A-Fa-f]{1}")
(or at least I hope that is the recommended way to do it). So I am just looking for some input on how to go about handling requirement number one in a simple and efficient way.
Thanks!