regex: remove all but? -


i have html looks like

<tr> <td align="left"><a target="_blank" href="/tags/ref_color_tryit.asp?color=yellow">yellow</a>&nbsp;</td> <td align="left"><a target="_blank" href="/tags/ref_color_tryit.asp?hex=ffff00">#ffff00</a></td> <td bgcolor="#ffff00">&nbsp;</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>&nbsp;</td> <td align="left"><a target="_blank" href="/tags/ref_color_tryit.asp?hex=9acd32">#9acd32</a></td> <td bgcolor="#9acd32">&nbsp;</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> 

what wanting

filter html end with

<td bgcolor="#xxxxxx">&nbsp;</td>

then filter end whole pile of rows of

xxxxxx xxxxxx 

how that?

hi can use following regex.

\<td bgcolor\=\"([^\"]+\)">\&nbsp\;\<\/td\> 

use group option capture "xxxxxx"


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -