3

I have a Paw related question.

Does anybody know how to extract a value from an encoded URL response field with Paw? The value is the only part of the encoded URL which starts with a %3D (the URL encoded version of an = sign).

Getting the dynamic values out of JSON, a JSON array, a URL, etc worked great.

enter image description here

rustyMagnet
  • 3,479
  • 1
  • 31
  • 41

2 Answers2

3

You can use our RegExp Match dynamic value for this: https://luckymarmot.com/paw/extensions/RegExMatch

  • insert the RegExp Match dynamic value first
  • as input for RegExp Match use the Response Parsed Body dynamic value (with the key path to the url-encoded field with the id)
  • write the regular expression to extract the id from the field (see example in the screenshot)

regexp match and response parsed body combined

Natalia Panferova
  • 1,134
  • 7
  • 9
2

Excellent point Natalia. Instead of the Regex extension I used the Substring extension. This worked perfectly as the size of the encoded URL never changed.

rustyMagnet
  • 3,479
  • 1
  • 31
  • 41