What are you trying to achieve?
In an http request module I am doing a “GET” to retrieve a variable.
This variable needs to be separated because I don’t need all the characters.
While doing some research here in the community I saw the option of using the “SPLIT” function since the “SUBSTRING” function doesn’t work because this variable never has the same size.
I’ve been trying to separate this variable for days and I can’t do it in any way, I feel like an idiot.
Steps taken so far
So, first I do a “GET” to get the variable.
Now that I have the variable, I created a “SET A MULTIPLE VARIABLES” module
to separate the data.
The problem is that normally the variable comes in this format:
XSRF-TOKEN=eyJpdiI6IjNpMXVsMWl1enBRUUsrejAxWlwva1JBPT0iLCJ2YWx1ZSI6ImlQNEJcLzkyUHRmSVJvNzlTdU5WQ3pnQ24yTFowV3NjUU13VE9PdDFobzVcL1R4d UlQZVZ5MmUySjBZV1VuYU9ZKyIsIm1hYyI6IjAxYjA2NWE4MjNkZGM3Y2IyMWUwNzQ yNjU4Njk1NDI1NTU2NGI0YWIyOTJkYjhlZWM2YjA0ZWJmMDk0ZDU2MmUifQ%3D%3D; expires=Sex, 24-Jan-2025 20:26:18 GMT; Max-Age=21600; path=/
What I need to do is separate it into 2 variables, they should look like this:
First variable:
eyJpdiI6IjNpMXVsMWl1enBRUUsrejAxWlwva1JBPT0iLCJ2YWx1ZSI6ImlQNEJcLzkyUHRmSVJvNzlTdU5WQ3pnQ24yTFowV3NjUU13VE9PdDFobzVcL1R4dUlQZV Z5MmUySjBZV1VuYU9ZKyIsIm1hYyI6IjAxYjA2NWE4MjNkZGM3Y2IyMWUwNzQyNjU4Njk1NDI1NTU2NGI0YWIyOTJkYjhlZWM2YjA0ZWJmMDk0ZDU2MmUifQ%3D%3D
So I need to remove the beginning:
XSRF-TOKEN=
and the end:
; expires=Fri, 24-Jan-2025 20:26:18 GMT; Max-Age=21600; path=/
Second variable:
XSRF-TOKEN=eyJpdiI6IjNpMXVsMWl1enBRUUsrejAxWlwva1JBPT0iLCJ2YWx1ZSI6ImlQNEJcLzkyUHRmSVJvNzlTdU5WQ3pnQ24yTFowV3NjUU13VE9PdDFobzVcL1R4 dUlQZVZ5MmUySjBZV1VuYU9ZKyIsIm1hYyI6IjAxYjA2NWE4MjNkZGM3Y2IyMWUwNz QyNjU4Njk1NDI1NTU2NGI0YWIyOTJkYjhlZWM2YjA0ZWJmMDk0ZDU2MmUifQ%3D%3D
In this second one, I just need to remove the end:
; expires=Fri, 24-Jan-2025 20:26:18 GMT ; Max-Age=21600; path=/
I managed to do this second one just by using “SPLIT” by putting
“; expires=”
but in the first one I can only remove the beginning OR the end, I can’t remove both.