Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

RegEx problem

New Here ,
Nov 30, 2007 Nov 30, 2007
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.
TOPICS
Server side applications
249
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 30, 2007 Nov 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
LEGEND ,
Nov 30, 2007 Nov 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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 30, 2007 Nov 30, 2007
LATEST
Oh, good grief... That's it! Thank you, David.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines