Wednesday, March 12, 2014

Vs2013 search and replace in html classes

This lovely regex helps pull extra whitespace out of a class attribute. search: class="\s*(\w+)\s+(\s\w+)?\s*" replace: class="$1$2" It only handles up to 2 classes being inside and... I forgot to consider the possibility of having razor inside. However, this shouldn't break that it just won't clean it.

1 comment:

  1. Мagnificent websіte. Plentƴ of useful info herе. I am senmding it to some pals ans additionallү sharing in
    delicious. And certainly, thank you for your effօrt!


    My bloց; signs that ʏour ex boyfriеnd still likes you ()

    ReplyDelete