Using split function

I have a variable coming from one of my module, which is something like :

"inline; filename=Rechnung-RE-143714-46566.pdf"

that i access within the variable 10.headers.`content-disposition

I want to have only Rechnung-RE-143714-46566.pdf
So far i have tried :

split(10.headers.content-disposition, "filename=")[1]
and
split(10.headers.content-disposition; """=""")}}[1]

both ending up not giving me what I wanted.
What I am doing wrong ?

Hey Tatiana,

the split function turns a string into an array. You are either looking for substring() if its fixed length or a text parser to match pattern using a regular expression.

1 Like

Hi!

Thanks for your answer, that worked out :slight_smile: