Reputation: 117
I use the code below in iMacros to extract the first 10 words of a phrase. There are situations when it works 100%, but there are also other situations when some of the extracted words are called "undefined"
Does anyone know why this is happening? Or does anyone know a better option to extract a certain number of words from a phrase? First 10 or first 15 words, etc. etc
set !var0 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[0];")
set !var1 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[1];")
set !var2 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[2];")
set !var3 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[3];")
set !var4 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[4];")
set !var5 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[5];")
set !var6 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[6];")
set !var7 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[7];")
set !var8 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[8];")
set !var9 eval("var s=\"{{!extract}}\"; s=s.split(\" \");s[9];")
I am using: Browser: Google Chrome Version 105.0.5195.102 (Official Build) (64-bit)
iMacros Personal Edition License - Addon for Chrome -Version 10.1.1
Windows 10 (64-bit)
Upvotes: 0
Views: 84