Forum Discussion

silygose's avatar
silygose
Occasional Contributor
9 years ago
Solved

Does JSON RegEx assertions support regex shortcuts

If I use JSON Path asseration for $..id and expected resutl is [121,130] the assertion passes. When using the JSON RegEx aseration I set JSON Path Expression to $..id[0] and RegEx to \d and expected result to true the assert fails. But if i set RegEx to [0-9]*, the assertion passes. It appears that REgEx in SoapUI 5.3 for Json RegEx asseration doesnt support regex shortcuts. When will short cuts be supported?

  • That is the expected behaviour.

     

    In your case, the result is 121 which can't matched with regex \d. It is supposed to be matched by expression \d+ as there are multiple digits.

     

    Try it out and see.

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3

    That is the expected behaviour.

     

    In your case, the result is 121 which can't matched with regex \d. It is supposed to be matched by expression \d+ as there are multiple digits.

     

    Try it out and see.