Find and Replace in Visual Studio with Regex -
i have xsl file need replace classes single class. example:
class="class1", class="anotherclass", class="yoyoclass"
and replace values between quotes newclass.
find:
class=".*?"   replace:
class="newclass"   explanation:
the replacement self-explanatory, since same classes.  part of find regex needs explanation .*? term.  here, ? tells regex stop consuming upon hitting first closing quotes.  try removing ? , see regex become greedy , match until last quote.
Comments
Post a Comment