2 Replies Latest reply: Jul 3, 2012 6:39 AM by WolfShade RSS

    REReplace / Regex Help

    wmkolcz Community Member

      I have to replace single quote marks in a html file with doubles without changing aprosphies. All are in class='' files but some are not closed at the end. Some contain additional information. I was looking for "class='" as my replace and then "'/>" as my ending by it doesnt catch those correctly with a stye also in the string.

       

      I want to use regex to look for class='%' but dont know if there is a way to replace the wildcard content back and only replace the single quotes that surround it.

       

      I.E. <class='page_general_content' /> = <class="page_general_content" /> or <class='image_body'> = <class="image_body" />

       

      or my personal favorite <div class='media_wrapper' style='width:300px;'> = <div class="media_wrapper" style="width:300px;"> where i have to look for a wildcarded style too.

       

      Any ideas on how to do this. Of course it came in this morning and needs to be done today so code examples would be highly appreciated. Thanks!