asp.net - Use FInd/Replace to re-order attributes in Visual Studio -



asp.net - Use FInd/Replace to re-order attributes in Visual Studio -

across many hundreds of pages in old webforms app, there gridviews declared in html as

<asp:gridview gridlines="none" ..... >

where every gridview tag starts <asp:gridview gridlines="none"

this shot in dark, i'm wondering if gridlines property can moved end of tag using regex in search & replace? example,

<asp:gridview gridlines="none" .....>

would become

<asp:gridview ..... gridlines="none">

..... represents many other attributes can exist, aren't declared in particular order.

update

some gridview controls utilize resource file info allow multi-lingual output. tag gets corrupted, can regex business relationship that?

<asp:gridview gridlines="none" ..... emptydatatext="<%$ resources: reports, noresultsfound %>" .....>

yes, can. address issue of non-serialzed > , <, can use

gridlines="none"([^<>]*(?>(?>(?'open'<)[^<>]*)+(?>(?'-open'>)[^<>]*)+)+(?(open)(?!)))

replacement:

$1 gridlines="none"

see demo here (go context tab @ bottom see replacement results).

asp.net regex visual-studio visual-studio-2012 attributes

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -