I would like to extract "toast" from a string <h1>test</h1><div>toast</div>. What regular expression could isolate such a string?
Edit: Thanks to the user who who corrected the formatting.
More Info: There will always only be one instance of the div tag, the information inside may change but there will never be another div tag in the same string (the string is larger than the given sample)
Thanks!
Nokogiriis the best tool to parse the HTML and XML stuffs..regex = /<h1>test<\/h1><div>([^<]*)<\/div>/