I am trying to go through the HTML of a website and parse it looking for the max enrollment of a class. I tried checking for a substring in each line of the HTML file, but that would try to parse the wrong lines. So I am now using Regular Expressions. I have \t\t\t\t\t\t\t<td class="odd">([0-9])|([0-9][0-9])|([0-9][0-9][0-9])<\/td>\r\n
as my regular expression right now, but this regular expression matches the max enrollment as well as the section number. Is there another way to go about what I am trying to extract from the webpage? The HTML code snippet is below:
<tr>
<td class="tableHeader">Section</td>
<td class="odd">001</td>
</tr>
<tr>
<td class="tableHeader">Credits</td>
<td class="even" align="left"> 4.00</td>
</tr>
<tr>
<td class="tableHeader">Title</td>
<td class="odd">Linear Algebra</td>
</tr>
<tr>
<td class="tableHeader">Campus</td>
<td class="even" align="left">University City</td>
</tr>
<tr>
<td class="tableHeader">Instructor(s)</td>
<td class="odd">Guang Yang</td>
</tr>
<tr>
<td class="tableHeader">Instruction Type</td>
<td class="even">Lecture</td>
</tr>
<tr>
<td class="tableHeader">Max Enroll</td>
<td class="odd">30</td>
</tr>