rkent rkent - 9 months ago 57
HTML Question

Search and replace in Xcode

I have the following string in several places throughout a massive HTML file:

<div class="author">Some Author's Name</div>
. I want to replace that with
<author>Some Author's Name</author>
and obviously adjust the corresponding CSS classes.

Is it possible to do that in a single Find and Replace in Xcode 6.1 without having to go through line by line?


I recommend you this article replace with regex in XCode.

Use the regex <div class="author">(.*)</div> to find your entities and replace with <author>$1 </author>