Im not sure if this is possible but...
I have a large block of text (kml format, which is basically xml) it contains sections of code that look like this (around 75 of them)
<color>ff0780dd</color> *bgcolor
<th>MSOA11CD</th> *code
<td>E02001618</td>
what i need to do is, set the *bgcolor where each *code is different, once i have the *code i can look in my DB and assign the correct color.
I could use regex to get each *code that starts with "MSOA+4chars" but how would i then edit the color code above it?
Cheers