rkent rkent - 2 years ago 126
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?

Answer Source

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>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download