I am trying to find a way to get the numerical value of a line of HTML code, that falls after a particular HTML tag. Here is an example of what I am talking about:
<TD align="middle" valign="middle"><font face="Arial" size="3">100
The above is just an example, but every value that I need to get comes after the size="3">
(emphasis added). I want to just grab, for the example, the number 100 and remove everything behind the size="3">
, to include removing size="3">
itself. There are other areas in the HTML that don't look necessarily like this, but all of the numerical values that I need to get have the size="3">
right before them, so I was thinking I could use that as a search pattern. The quotes around the 3 are screwing me up too.
I was tinkering with something I found on the net about grabbing a single character after a certain word:
sed 's/.*size="3">\(.\).*/\1/' report_file.htm
Also, the size="3">
pattern is found multiple times in the same line, so whatever it is that I need to do also has to account for that (meaning, not deleting anything past the first found instance of size="3">
on a particular line.