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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -