I am trying to get the text between two tag.
<b> foo</b>bar<br/>
=> bar
I tried using '<b>asdasd</b>qwe<br/>'.scan(/<b>[a-zA-Z0-9]*<\/b>(.*)<br\/>/)
and it gives me proper result.
but when I try this :
'<b>exclude</b>op1<br/>exclude 2<b>exclude</b>op2<br/>exclude 2<b>exclude</b>op3<br/>exclude 2'.scan(/<b>[a-zA-Z0-9]*<\/b>(.*)<br\/>/) { |ele|
puts ele
}
It matches the first <b>
tag and the last <br/>
tag and returns the whole string I was expecting an array of matches