View Single Post
Old 07-21-2011, 01:42 AM   #20
virtual_ink
Zealot
virtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheesevirtual_ink can extract oil from cheese
 
virtual_ink's Avatar
 
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
Quote:
Originally Posted by coldplayplayer View Post
I use Notepad++ to edit my XHTML and CSS. Today I did a very similar thing you are asking about I think.

I did a find and replace search like this.

FIND: <p>(.*)</p>
REPLACE: <p><span>\1</span></p>

The (.*) is a wildcard search I believe so it found every instance in my XTHML page that started with <p> had text in between and then ended with </p> and replaced it with the <p><span> and </span></p>.

If you use them, don't forget to add the class after the p, for example <p class="bodytext">(.*)</p>

It worked for me and 99 changes were done in a little under a minute.
If my code already contains a class, and reads for eg:

<p class="bodycenter"><span>text text text</span></p>

Is there a way to adjust and use this find/replace methodology?
virtual_ink is offline   Reply With Quote