Forum Discussion

pedro's avatar
pedro
Occasional Contributor
7 years ago
Solved

How to Assert Regex Rest response with groovy script?

Hello everyone, I am struggling with a validation I need to make because in SoapUI NG 1.9 does not work the JSONPath RegEx Match Assertion(image attached)

 

Can anyone help on how to perform this assertion I need to use to validate a RegEx json node?

 

I am trying to validate the following hour format in a node at REST response:

 

                 YYYY-MM-DDThh:mm:ss.sTZD

                 (e.g. 1997-07-16T19:20:30.45+01:00)

 

Please can anyone help with this? 

 

Thanks in advance. :D 

 

Pedro

  • Below regex should help:

     

    (\d{4}[-\d{2}]+T[?:\d{2}]+[\.][\d]+[\+|\-][?:\d+]+)

     

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3

    Below regex should help:

     

    (\d{4}[-\d{2}]+T[?:\d{2}]+[\.][\d]+[\+|\-][?:\d+]+)