Welcome to WebmasterWorld Guest from 54.147.50.227

Forum Moderators: open

Message Too Old, No Replies

Regular expressions in NeoOffice Calc

     
4:50 pm on Jun 16, 2008 (gmt 0)

Full Member

10+ Year Member

joined:July 27, 2005
posts:329
votes: 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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members