Reputation: 15
I'm writing a macro to extract some information outta website. Full code here : http://www.heypasteit.com/clip/25QI
TAG POS=1 TYPE=DIV ATTR=CLASS:pdpMemberSizes&&ID:sizesList* EXTRACT=TXT
Returns
XS
S
M
L
XL
I want to know how to remove the line breaks and join them with a comma or something. I have very little knowledge in javascript so it's hard for me to solve this. I would like know how to save all the extractions in one line and go to next line in the next loop>> repeat.
Upvotes: 0
Views: 752
Reputation: 5299
Try something like this:
SET delimiter ","
SET replaced EVAL("'{{!EXTRACT}}'.replace(/\\n+/g, '{{delimiter}}');")
Upvotes: 0