mehcul 1 Posted February 1, 2018 Report Share Posted February 1, 2018 (edited) Hello @ everyone, i need help by scraping this code in html.<span data-pass="7">3 + 4 = </span> how can i let directly type the result into the field?because i cant touch 3 + 4 separatly i think its better to get directly the result? thanx for help. Edited February 1, 2018 by mehcul Quote Link to post Share on other sites
pash 504 Posted February 2, 2018 Report Share Posted February 2, 2018 load html("<span data-pass=\"7\">3 + 4 = </span>") set(#Debug,$scrape attribute(<data-pass=7>,"innertext"),"Global") set(#Debug,$replace regular expression(#Debug,"(\\s|\\=)",""),"Global") set(#Mark,$find regular expression(#Debug,"[^\\d\\=\\s]"),"Global") set(#Degi1,$find regular expression(#Debug,"\\d+(?=(\\+|\\-|x|\\*|\\/))"),"Global") set(#Degi2,$find regular expression(#Debug,"(?<=\\d+(\\+|\\-|x|\\*|\\/))\\d+"),"Global") if($comparison(#Mark,"=","+")) { then { alert($add(#Degi1,#Degi2)) } else { } } Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.