I am trying to update a numbering/numeration in a test.html file:
<td class="no">(8)</td>
<td class="no">(9)</td>
<td class="no">(10)</td>
<td class="no">(11)</td>
<td class="no">(23)</td>
A new line could be added between the other lines, so I don't want to update the numeration always manually. Another condition is, that the update should start after number 7.
I tried to use gensub by replacing the line by the match but it doesn't work how I thought. There must be an easier way to determine the numbers! No tutorials or forum posts did help me or I didn't understand them...
So far what I have:
/^<td class="no">\([0-9]+\)<\/td>$/ {
a = gensub(/(.*)([0-9]+)(.*)/, "\\2", "g") # this finds only 1 digit, why?
if (a > 7) print a
}