Skip to main content
Participant
November 30, 2007
Answered

RegEx problem

I have Dreamweaver 2004 and am using it's Find and Replace with Use regular expression.

With an html file I am trying to find a section of code that has <meta name="Copyright and the first <p>. I have tried
\s*<meta name="Copyright"([\s\w\W]+)(?=<p>)
(and many more like this!) but the result contains the last <p> of the file and all that is in between. I only want the first <p>. What do I do?

Thanks.
This topic is closed to new replies. Start a new post to keep the conversation going.
Newsgroup_UserCorrect answer
Inspiring
November 30, 2007
Scotty S wrote:
> With an html file I am trying to find a section of code that has <meta
> name="Copyright and the first <p>.

<meta name="Copyright"[\s\w\W]+?<p>

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

2 replies

Scotty_SAuthor
Participant
November 30, 2007
Oh, good grief... That's it! Thank you, David.
Translate
Newsgroup_UserCorrect answer
Inspiring
November 30, 2007
Scotty S wrote:
> With an html file I am trying to find a section of code that has <meta
> name="Copyright and the first <p>.

<meta name="Copyright"[\s\w\W]+?<p>

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate