regex - html tag attr regular expression in vs 2008 -


i ask regular expression question. want search following syntax in vs 2008:

<table width="10%" class="test" style=""> </table>  <table class="test" style="" width="10%">  </table>  <table class="test" width="10%" style=""> </table>  <table class="test" width="10%"></table>  <table class="test"></table>  <table></table>  <div width="10%"></div> 

i search width= in above table text.

the search regular expression

table[^\w]+width="[^"]+" 

after search result

<table width="10%" class="test" style=""> </table>  <table class="test" style="" width="10%">  </table>  <table class="test" width="10%" style=""> </table>  <table class="test" width="10%"></table>  

and want replace width style="width:"

the result should be

<table style="width:10%" class="test" style=""> </table>  <table class="test" style="" style="width:10%">  </table>  <table class="test" style="width:10%" style=""> </table>  <table class="test" style="width:10%"></table>  

how can make replacement?

use following regular expression:

width="[^"]+" 

[^"] matches character not ".


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -