Skip to content

Instantly share code, notes, and snippets.

@nickjj

nickjj/example.html Secret

Last active Oct 18, 2019
Embed
What would you like to do?
// What can I do with nokogirl to return only this ul element from the below example HTML snippet:
<ul>
<li>Good</li>
<li>Yes</li>
<li>Great</li>
</ul>
// The pseudo logic would be "return the ul after the h2 with text 'Hello World' but nothing else
---
<h2>Cool</h2>
<ul>
<li>Skip this</li>
<li>Don't match this</li>
</ul>
<h2>Hello World</h2>
<ul>
<li>Good</li>
<li>Yes</li>
<li>Great</li>
</ul>
<h2>Something else</h2>
<ul>
<li>Nope</li>
<li>Do not include this</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.