Page 1 of 1

Function: $between | Quotation Marks

Posted: Mon Apr 20, 2020 1:30 pm
by taner
Hello FFAStrans-community,

Maybe someone could help me.
When using function $between I'm not able to extract the part I want.

This is the original string:
input_i" : "-24.11"

I want to extract this:
-24.11

This is the command I use in Populate Variables
$between("VARIABLE", "input_i" : "", """)

As far as I can see it is related to the quotation marks which the original-string has.
Command works when I use an other part which does not have quotation marks.

Does someone know a workaround?


Best
Taner

Re: Function: $between | Quotation Marks

Posted: Mon Apr 20, 2020 2:20 pm
by emcodem
Hey @taner

always good to read from you here!
Good question i updated the Wiki functions section (Escaping doublequotes).

Basically you just need to provide 2 doblequotes instead of one. This works for me using your input:

Code: Select all

$between("%s_your_variable%",": ""","""")
or a little more complex, add additionally the input_i... section:

Code: Select all

$between("%s_file_list%","input_i"" : ""","""")

Re: Function: $between | Quotation Marks

Posted: Mon Apr 20, 2020 3:57 pm
by taner
Hi emcodem,

Thanks a lot, it works.
Actually a pretty noob-question.
Didn't have to escape special characters/quotation marks for a long time.
Again: Thanks!

Taner