问题
I'm using iMacros.
I want to extract/split designperks
from:
title="designperks's Instagram Profile"
So I'm using:
SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.split(\"'\"); ")
But that doesn't work, and it should, do you know why?
Many thanks!
回答1:
var title="designperks's Instagram Profile";
s= title.split("'");
console.log(s[0]) // required output
check this.
回答2:
var macro;
macro ="CODE:";
macro +="TAG POS=1 TYPE=DIV ATTR=name:SOME_DIV EXTRACT=TXT"+"\n";
iimPlasy(macro)
text=iimGetLastExtract();
text=text.split(",")[0];
alert(text);
This could work if you edit it per your request.
来源:https://stackoverflow.com/questions/25696429/s-split-with-title-dont-work