I want to find NUMBER, but skip H1 , H2 , H3 and so on.. (all possible HTML heading variants)
Example 1:
<div>Today is good day. I got<h3>3<span> lotto tickets</span></h3></div>
Example 2:
I want to buy lotto tickets. <h1>Maybe 10 is enough</h1>
Example 3:
I want to buy lotto tickets. <h1>4 or 5</h1> is enough.
I have this code:
lotto tickets\D{0,15}(\d+\,\d+|\d+\.\d+|\d+)
But every time i get numbers from HTML tag.. <h3>
(3) , <h1>
(1).
How i can skip them?
In example 1 i should get nothing
In example 2 i should get number 10
In example 3 i should get number 4
(Numbers can be with . or , example: 2.5)