I have some texts returned by Google Maps, I would like to remove the div tags, (replacing them by <br />
would be the perfect deal
'Turn <b>right</b> onto <b>Route de Sospel/D2566</b>
<div style="font-size:0.9em">Continue to follow D2566</div>
<div style="font-size:0.9em">Go through 6 roundabouts</div>'
=>
'Turn <b>right</b> onto <b>Route de Sospel/D2566</b><br />
Continue to follow D2566<br />Go through 6 roundabouts'
I don't know which solution would be better either find the appropriate regex, might be hard, but more performant than evaluating this string with $() Jquery and them find('div').text() inside ...
thanks for your advices (or sample code)