Skip to content

Instantly share code, notes, and snippets.

@Talltree-DE

Talltree-DE/.rb Secret

Last active August 26, 2016 21:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Talltree-DE/4eafb0fa273914f151ff6937845126a2 to your computer and use it in GitHub Desktop.
splitting array
qt = page.xpath('//p[contains(concat(" ", normalize-space(@class), " "), " qt ")]').map do |a|
a.text.split('</p>').each do |a|
a.split(/\r\n|\n/).each do |a|
a.split(/(?<=[>])/)
end
end
end
print qt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment