Help with regex match #29
Replies: 1 comment 1 reply
-
Hi @AkikoOrenji, For example, this regex That being said, If your source text is JSON, depending on what exactly you need to extract, you don't need to use the regex replace functionality, but instead can set JSON as the Source Value Type and then use a JSON Path as the Source Value Path to extract the value from the JSON that you want. For example, if I have the JSON |
Beta Was this translation helpful? Give feedback.
-
I'm trying to use Set Variable to extract a token from a stored server response (manually generated with Send Request and Capture Output to global variable) and place it into another variable i can use in other requests (or directly using Set Value on those request).
I notice the Regex Pattern will allow me to select a pattern from the source text e.g. _token":"(.*?)","token_ (grab everything between the _token and token_) and replace it with a Regex Replacement Text but what i really need is to save it into a new variable. Leaving the Regex Replacement Text box blank results in the new variable including everything from the original text minus the value i actually wanted and what matched with the regex.
Any ideas on a better approach for grabbing the data i need out of a Text Value into a variable ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions