简体   繁体   中英

Split Extracted Text Around Double Quotes inside Eval Statment in Imacros

I am trying to Split Text using the Eval Command in Imacros around Double Quotes but it does not seem to work. Maybe as the double quotes can only be recognised here as start and end of a String?!

I tried This:

SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s=s.split(\"\"\")[2];s;")

and This:

SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s=s.split(\")[2];s;")

None are working. Any workaround this? Thanks in advance.

Try this:

SET !EXTRACT "bla bla bla \"Need this\" bla bla bla"
SET !VAR1 EVAL("var s = '{{!EXTRACT}}'; s = s.split('\"')[1]; s;")
PROMPT {{!VAR1}}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM