s.split with TITLE don't work? [duplicate]

有些话、适合烂在心里 提交于 2019-12-13 10:50:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!