If I have an HTML string such as:
<div><p>£20<span class="abc" /><span class="def">56</span></p></div>
And I want the text:
20<span class="abc" /><span class="def">56
How do I define a regular expression to match the target sections multiple times. So far I have:
str.match(/\d*<[^>]*>\d*/)
But this will only return the first number section 20<span class="abc" />
I need this to be flexible to match multiple tag / numeric sections while trimming anything leading or trailing the first / last digit in the string.