How to get text after or before certain tags using Nokogiri
问题 I have an HTML document, something like this: <root><template>title</template> <h level="3" i="3">Something</h> <template element="1"><title>test</title></template> # one # two # three # four <h level="4" i="5">something1</h> some random test <template element="1"><title>test</title></template> # first # second # third # fourth <template element="2"><title>testing</title></template> I want to extract: # one # two # three # four # first # second # third # fourth </root> In other words, I want