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.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…