aaronjonmartin
Technical User
Hi guys I have a string which contains the html for a table, here is an example row:
what I wish to do is replace all the <td class="c1"> with just simple <td>'s. So my idea is to use the replace function with some kind of pattern match with a wildcard for the number character. The only problem is I cant figure out how to do it. I only need to match the numerical character in the string and not the c as in the example above as all the classes start with c.
Any ideas on how to achieve this would be greatly appreciated.
Aaron
"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)
Code:
<tr class="r2">
<td class="c1">1</td>
<td class="c2">12<td>
<td class="c3">29</td>
<td class="c4">40</td>
<td class="c5">75</td>
</tr>
what I wish to do is replace all the <td class="c1"> with just simple <td>'s. So my idea is to use the replace function with some kind of pattern match with a wildcard for the number character. The only problem is I cant figure out how to do it. I only need to match the numerical character in the string and not the c as in the example above as all the classes start with c.
Any ideas on how to achieve this would be greatly appreciated.
Aaron
"It's so much easier to suggest solutions when you don't know too much about the problem."
Malcolm Forbes (1919 - 1990)