Function: $between | Quotation Marks

Questions and answers on how to get the most out of FFAStrans
Post Reply
taner
Posts: 204
Joined: Sun Jun 19, 2016 6:36 pm

Function: $between | Quotation Marks

Post 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
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Function: $between | Quotation Marks

Post 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"" : ""","""")
emcodem, wrapping since 2009 you got the rhyme?
taner
Posts: 204
Joined: Sun Jun 19, 2016 6:36 pm

Re: Function: $between | Quotation Marks

Post 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
Post Reply