This question is an exact duplicate of:
- Regex with div classes 1 answer
I need to remove the div and td tags in order to extract out the content between to insert into database. However to some constraints I have to use regex and not xpath or DOM Document to extract out the content. Need help! Thanks
<tr class = "student_information" >
<div class="admin"><td>141234U</td></div>
<div class="name"><td>Tan Ping Ping</td></div>
<div class="hp"><td>82222222</td></div>
<div class="email"><td>141234U@mymail.nyp.edu.sg</td></div>
</tr>
<tr class = "student_information" >
<div class="admin"><td>132458Q</td></div>
<div class="name"><td>Tan Rui</td></div>
<div class="hp"><td>86339557</td></div>
<div class="email"><td>132458Q@hotmail.com</td></div>
Output:
141234U
Tan Ping Ping
82222222
141234U@mymail.nyp.edu.sg
132458Q
Tan Rui
86339557
132458Q@hotmail.com
</div>