I want to add h323:number style links to HighRise contact numbers, so that users can click a link to dial the IP phone...
The html I'm looking at is:
<table>
<tbody>
<tr>
<th>Phone</th>
<td>+44 (0)1123 1231312<span>Work</span></td>
</tr>
<tr>
<th></th>
<td>+44 (0)777 2342342<span>Other</span></td>
</tr>
</tbody>
</table>
and basically I want to pull out the number which is in a td and which starts with +44, strip out the spaces and stick in a link inside the span that has an href like
h323:4411231231312
i.e. is stripping out the 0 in brackets.
Any help would be greatfully received to any of the following.
(1) How do I match the td containing +\d\d numbers? (2) How do I use selectors to exclude the span when I get the number from the td (3) What regex should I use to cleanup the number for the href?