Je html qui ressembleregex: tout supprimer mais?
<tr>
<td align="left"><a target="_blank" href="/tags/ref_color_tryit.asp?color=Yellow">Yellow</a> </td>
<td align="left"><a target="_blank" href="/tags/ref_color_tryit.asp?hex=FFFF00">#FFFF00</a></td>
<td bgcolor="#FFFF00"> </td>
<td align="left"><a href="/tags/ref_colorpicker.asp?colorhex=FFFF00">Shades</a></td>
<td align="left"><a href="/tags/ref_colormixer.asp?colorbottom=FFFF00&colortop=FFFFFF">Mix</a></td>
</tr>
<tr>
<td align="left"><a target="_blank" href="/tags/ref_color_tryit.asp?color=YellowGreen">YellowGreen</a> </td>
<td align="left"><a target="_blank" href="/tags/ref_color_tryit.asp?hex=9ACD32">#9ACD32</a></td>
<td bgcolor="#9ACD32"> </td>
<td align="left"><a href="/tags/ref_colorpicker.asp?colorhex=9ACD32">Shades</a></td>
<td align="left"><a href="/tags/ref_colormixer.asp?colorbottom=9ACD32&colortop=FFFFFF">Mix</a></td>
</tr>
Ce que je voulais faire est
filtre le code html donc je ne finissent avec
<td bgcolor="#XXXXXX"> </td>
Puis filtre que je finis donc avec tout un tas de rangées de
XXXXXX
XXXXXX
Comment ferais-je cela?
Vous ne voulez pas. C'est un endroit terrible pour utiliser n'importe quelle regex ... D'autres possibilités? – Blender
pagination dr. Bobince? http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 – harpo
3 983 personnes sont d'accord: [Ne pas parser HTML avec regex!] (http : //stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) –