Hi Everyone, I want to evaluate the value in a variable through regular expression. When the variable does not match the reg expression I want to perform a certain keyword.I have
*** Variables ***
${geb-dat}= 1974-06-01
*** Test Cases ***
Bepaal juiste datum formaat
${a}= Should Match Regexp ${geb-dat} ^[0-9]{2}-[0-9]{4}-[0-9]{2}
Log ${a}
IF ${a} == 'false'
Format Dateformat ${geb-dat}
ELSE
Log something
END
So in case the reg expression is not a match I want it to perform keyword "Format DateFormat"
I am getting the errormessage:
'1974-06-01' does not match '^[0-9]{2}-[0-9]{4}-[0-9]{2}'
I want it to result in boolean true or false. So I can eveluate that in my IF ELSE statement.
How to do that?
Kind Regards, Marco