reStacks 0 Posted November 14, 2015 Report Share Posted November 14, 2015 Hey, Complete noob here so go easy on me! If I scrape attribute into variable and get data like; PID4645: "Green Card" class user Where PID4645 is product id"Green Card" is productetc How can I then seperate these into individual variables.I watched a few tutorials but couldn't find an answer Thanks for any help Quote Link to post Share on other sites
pash 504 Posted November 14, 2015 Report Share Posted November 14, 2015 ? 1 Quote Link to post Share on other sites
reStacks 0 Posted November 14, 2015 Author Report Share Posted November 14, 2015 use "Regex" Thanks for your reply Could you expand on that a little using my example; PID4645: "Green Card" class user To split this into 4 seperate variables. ID. Product name. etc Sorry to ask again but I'm a little lost Quote Link to post Share on other sites
pash 504 Posted November 15, 2015 Report Share Posted November 15, 2015 ? 1 Quote Link to post Share on other sites
reStacks 0 Posted November 15, 2015 Author Report Share Posted November 15, 2015 or other add list to list(%myList,$list from text("PID4645: \"Green Card\" class user","\""),"Delete","Global") This hasn't really helped me. I'm using;http://i1204.photobucket.com/albums/bb410/reStacks/one_zpsvnkbirh0.jpg Which adds text to #item1 like this; PID4645: "Green Card" t-shirt by nike but it would be different each time for example; PID4646: "Blue Card" hat by addidas I want to add "Green Card" to a variable - #name1I want to add nike to a variable - #maker1 Any help is welcome Quote Link to post Share on other sites
deliter 203 Posted November 22, 2015 Report Share Posted November 22, 2015 Pash can only guess as you have not posted a valid snippet Please post the exact result of the scraping picture above,with "Attribute to scrape" as outerhtml and innertext from this quote"PID4646: "Blue Card" hat by addidas" try (my regex is not very good by the way,but you might learn more because of how basic my regex is) set(#snippet,"PID4646: \"Blue Card\" hat by addidas","Global")set(#productID,$replace regular expression($find regular expression(#snippet,"^.+?:"),":",""),"Global")set(#name,$replace regular expression($find regular expression(#snippet,"\".+?\""),"\"",""),"Global")set(#company,$replace regular expression($find regular expression(#snippet," by .+?$")," by ",""),"Global")set(#product,$replace regular expression($find regular expression(#snippet,"\" .+? by"),"\"| by",""),"Global") Quote Link to post Share on other sites
pash 504 Posted November 22, 2015 Report Share Posted November 22, 2015 ? 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.