Greetings,
I need to check whether the format of value stored database is correct. It should check for something like that:
x-x
x-xx
xx-xx
xxx-xxx
etc.
where xxx should be an integer. So the concept is to check if value has the following format: Integer – Integer
Try this –
returns 1 if proper word else returns 0
EDIT: Works assuming you do not have any strings with consecutive ‘-‘ like ‘–‘ followed by numbers on both sides. Works for all other cases.