Skip to content

Instantly share code, notes, and snippets.

@xificurC
Last active November 5, 2015 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xificurC/273ba73a1420d70bab54 to your computer and use it in GitHub Desktop.
Save xificurC/273ba73a1420d70bab54 to your computer and use it in GitHub Desktop.
textual: complement charset "<"
test: {
<div class="tmi-group ">
<div class="tmi tmi-daily bold ">
<div class="tmi-text-group">
<div class="tmi-name">
text here
<span class="tmi-qty">0,2l </span>
more text here.
</div>
</div>
<div class="tmi-price right"> </div>
<div class="clear"></div>
</div>
</div>
}
node: [start: end: "<" not "/" copy elem to [" " | ">"] (print elem)
[thru "/>"
| thru ">" any [node | textual] thru ["</" elem ">"]
] end: (print copy/part start end)
]
dailys: parse test [collect [any [to ["<div" copy rest to ">" if (find rest "tmi-daily")] here: (print copy/part here 20) keep node]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment