homepage Welcome to WebmasterWorld Guest from 54.205.207.53
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
Regular expressions in NeoOffice Calc
SilverLining

5+ Year Member



 
Msg#: 3676080 posted 4:50 pm on Jun 16, 2008 (gmt 0)

I have a CSV file, exported from mySQL, which I'm trying to update. What I want to achieve is to replace the <div> tags with <p> tags.

I can find this search term in the document:
<div class="className">.*</div>

but this one does not work:
<div class=\"className\">[A-z]+</div>

I'm not sure what to replace this with, because I want the content between the div tags to stay in place.

e.g.
<p class="className">Content to stay in place</p>

I have also tried searching across multiple lines with this expression (white space, new line, white space):

</div>\s*\n*\s*<div class="className2">, but have not found any matches.

Also, could you please explain the use of \1 and $1?

I'm very much a newbie at this, so would appreciate any advice. I've had a look at some of the Regex posts on the Perl forum, but that's not down my alley.

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved