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 ...
  • nmrao's avatar
    9 years ago

    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.