I am trying to obtain only the birth date (not the word Birthday but the date) from the DOM.
I've tried creating a regex to replace everything before Birthday</th><td>
with a ''
but I can't figure out how to remove the rest after the date as well as a split & join. Before resorting to cross referring an array of EVERY day in the calendar year, I thought I'd turn to StackOverflow.
I can get the HTML using:
document.getElementById('personal-info-view').innerHTML
which returns:
"<tbody><tr><th scope="row">Birthday</th><td>October 21</td></tr><tr><th scope="row">Marital Status</th><td>Single</td></tr></tbody>"
From here:
<table id="personal-info-view" class="additional-info-listing" summary="Personal Details">
<tbody>
<tr>
<th scope="row">Birthday</th>
<td>October 21</td>
</tr>
<tr>
<th scope="row">Marital Status</th>
<td>Single</td>
</tr>
</tbody>
</table>
CONTEXT UPDATE:
I am trying to get an alert when my connections on LinkedIn have upcoming birthday's while looking though their profiles.