3 Replies Latest reply on Feb 22, 2009 2:35 PM by joelpittet

    Find and Replace

    wanger12
      I have 1000's of pages, i need to find pages that dont contain a certain word, so lets say i have below in most of the pages

      <meta name ="123"

      and i want to find html pages that DO NOT HAVE have this exact piece of code? Regular expression?

      any ideas would be greatly appreciated??

      Thanks
        • 1. Re: Find and Replace
          Level 7
          wanger12 wrote:
          > I have 1000's of pages, i need to find pages that dont contain a certain word,
          > so lets say i have below in most of the pages
          >
          > <meta name ="123"
          >
          > and i want to find html pages that DO NOT HAVE have this exact piece of code?
          > Regular expression?
          >
          > any ideas would be greatly appreciated??
          >
          > Thanks
          >
          <meta name ="[^(123)]

          Mick
          • 2. Re: Find and Replace
            Level 7

            > <meta name ="[^(123)]

            hmm, test that pattern in DW against:

            <meta name="1X23" />

            It won't match.

            Nor will this: <meta name="(123" />

            But this will match: <meta name="X123" />

            The parens are seen as characters inside the [], not as groups.

            That said, so far I've not found a pattern that works any better!

            --


            E. Michael Brandt

            www.divahtml.com
            www.divahtml.com/products/scripts_dreamweaver_extensions.php
            Standards-compliant scripts and Dreamweaver Extensions

            www.valleywebdesigns.com/vwd_Vdw.asp
            JustSo PictureWindow
            JustSo PhotoAlbum, et alia

            --
            • 3. Re: Find and Replace
              joelpittet Level 1
              Here is slightly more accurate but it would be nice if they had a more standard implementation of regular expressions.

              <meta name="([^"]*?)([^1][^2][^3])([^"]*?)" />

              FIND THESE
              <meta name="12C3" /> NOT FOUND :(
              <meta name="1X23" /> NOT FOUND :(
              <meta name="1Xd23" /> FOUND :)
              <meta name="(123" /> FOUND :)
              <meta name="X123" /> FOUND :)
              <meta name="X123Z" /> FOUND :)
              <meta name="ABC123" /> FOUND :)
              <meta name="!@#$%" /> FOUND :)
              <meta name="XYZABC" /> FOUND :)
              NOT THIS
              <meta name="123" /> NOT FOUND :)