Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] cdplayer sort

Expand Messages
  • Sheri
    ... Harvey is exactly right but all of the above are needed to convert the old regexp to new. Try substituting the appropriate lines with the ones below.
    Message 1 of 15 , Oct 11, 2006
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
      > You might try the 2 replacement lines below. In V5 'CRLF' is
      > now '\r\n' and backslash is replaced with '$' when designating
      > specific groups/units to use.
      >
      > If this doesn't work you might try changing the curly braces to
      > parens [...]

      Harvey is exactly right but all of the above are needed to convert the
      old regexp to new. Try substituting the appropriate lines with the
      ones below.

      ^!Replace "(\[.*\])\r\nartist=(.*)\r\ntitle=(.*)\r\n" >> "\r\nH="$2
      $3"\r\n$1\nartist=$2\r\ntitle=$3\r\n" AIRS

      ^!Replace "\r\nH=\".*\"\r\n" >> "^%Empty%" AIRS

      Regards,
      Sheri
    • Jeff Scism
      I know this is probably pretty early in the scheme of things, but is someone working on a clip that adapts all the Regex to the new one, one that can be run
      Message 2 of 15 , Oct 11, 2006
      • 0 Attachment
        I know this is probably pretty early in the scheme of things, but is
        someone working on a clip that adapts all the Regex to the new one, one
        that can be run on a clipbook library to upgrade it?


        Jeff

        Sheri wrote:
        > --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
        >> You might try the 2 replacement lines below. In V5 'CRLF' is
        >> now '\r\n' and backslash is replaced with '$' when designating
        >> specific groups/units to use.
        >>
        >> If this doesn't work you might try changing the curly braces to
        >> parens [...]
        >
        > Harvey is exactly right but all of the above are needed to convert the
        > old regexp to new. Try substituting the appropriate lines with the
        > ones below.
        >
        > ^!Replace "(\[.*\])\r\nartist=(.*)\r\ntitle=(.*)\r\n" >> "\r\nH="$2
        > $3"\r\n$1\nartist=$2\r\ntitle=$3\r\n" AIRS
        >
        > ^!Replace "\r\nH=\".*\"\r\n" >> "^%Empty%" AIRS
        >
        > Regards,
        > Sheri
        >
        >
        >
        >
        >
        > Fookes Software: http://www.fookes.us, http://www.fookes.com
        > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
        >
        >
        >
      • bruce.somers@web.de
        Jeff Scism wrote ... It certainly seems like an appropriate task for Fookes Software. One that has been missed. Bruce
        Message 3 of 15 , Oct 11, 2006
        • 0 Attachment
          Jeff Scism wrote

          > I know this is probably pretty early in the scheme of things, but is someone
          > working on a clip that adapts all the Regex to the new one, one that can be
          > run on a clipbook library to upgrade it?

          It certainly seems like an appropriate task for Fookes Software. One that has been missed.

          Bruce
        • Eric Fookes
          Unfortunately, it is not a process that can be automated reliably. ... -- Regards, Eric Fookes http://www.fookes.com/
          Message 4 of 15 , Oct 11, 2006
          • 0 Attachment
            Unfortunately, it is not a process that can be automated reliably.

            bruce.somers@... wrote:
            > Jeff Scism wrote
            >
            >> I know this is probably pretty early in the scheme of things, but is someone
            >> working on a clip that adapts all the Regex to the new one, one that can be
            >> run on a clipbook library to upgrade it?
            >
            > It certainly seems like an appropriate task for Fookes Software. One that has been missed.
            >
            > Bruce

            --
            Regards,

            Eric Fookes
            http://www.fookes.com/
          • Sheri
            ... I don t think an automated conversion would be reliable. There are too many variables. For example, in the new regular expression syntax, a negated
            Message 5 of 15 , Oct 11, 2006
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, Jeff Scism <scismgenie@...> wrote:
              > I know this is probably pretty early in the scheme of
              > things, but is someone working on a clip that adapts
              > all the Regex to the new one, one that can be run on a
              > clipbook library to upgrade it?

              I don't think an automated conversion would be reliable. There are too
              many variables. For example, in the new regular expression syntax, a
              negated character class always matches a newline. E.g., "[^a]" matches
              everything up to an "a", going on to the next line(s), whereas in the
              old, the match didn't stretch across multiple lines.

              Regards,
              Sheri
            • Axel Berger
              ... Why? The parser in 4.9 could identify all these things reliably and there are very simple rules what to put in their place. If you think about sources
              Message 6 of 15 , Oct 11, 2006
              • 0 Attachment
                Eric Fookes wrote:
                > Unfortunately, it is not a process that can be automated reliably.

                Why? The parser in 4.9 could identify all these things reliably and
                there are very simple rules what to put in their place. If you think
                about sources partially in new and partially in old code I agree, but
                else the old parser should manage just fine.
                (N.B: I want to learn here, not criticise.)

                Axel
              • buralex@gmail.com
                Axel: ... Axel: I think you are probably right that it can and should be done :) How about writing a clip yourself (using the new regexp syntax would
                Message 7 of 15 , Oct 11, 2006
                • 0 Attachment
                  Axel:

                  Axel Berger said the following on 2006-10-11 13:25:
                  > Eric Fookes wrote:
                  >
                  >> Unfortunately, it is not a process that can be automated reliably.
                  >>
                  >
                  > Why? The parser in 4.9 could identify all these things reliably and
                  > there are very simple rules what to put in their place. If you think
                  > about sources partially in new and partially in old code I agree, but
                  > else the old parser should manage just fine.
                  > (N.B: I want to learn here, not criticise.)
                  >

                  Axel: I think you are probably right that it can and should be done :)

                  How about writing a clip yourself (using the "new" regexp syntax would
                  probably be best) which will convert Find and Replace statements found
                  in any clb file from 4.95 syntax to 5.0 syntax? It sounds as if you
                  probably have a pretty fair sample set yourself and a handle on what the
                  differences are already?

                  If you code a first stab at it, I'm sure the rest of us self-proclaimed
                  regex wizards will pitch in to validate it against our own clips (at
                  least those that haven't already been converted). I'm fairly sure that
                  all the ones that are included with the base distribution have already
                  been converted, but since they are AFAIK mostly Jody's work and he's not
                  as yet a big fan of Regex there may not be that many examples.

                  Don (Htmlfixit) has an extensive library of "published" clips as well.
                  Don - How much do your clips use Regex?

                  Regards ... Alec -- buralex-gmail
                  --



                  [Non-text portions of this message have been removed]
                • Sheri
                  ... In many of my clips, I build parts of the regex ^!Find or ^!Replace command into variables. I don t see a conversion process taking care of things like
                  Message 8 of 15 , Oct 11, 2006
                  • 0 Attachment
                    --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
                    >
                    > Eric Fookes wrote:
                    > > Unfortunately, it is not a process that can be automated reliably.
                    >
                    > Why? The parser in 4.9 could identify all these things reliably and
                    > there are very simple rules what to put in their place. If you think
                    > about sources partially in new and partially in old code I agree, but
                    > else the old parser should manage just fine.
                    > (N.B: I want to learn here, not criticise.)
                    >
                    > Axel
                    >

                    In many of my clips, I build parts of the regex ^!Find or ^!Replace
                    command into variables. I don't see a conversion process taking care
                    of things like that. Previously mentioned negated character classes.
                    Potential conflicts with the syntax of regular expressions and
                    clipcode itself (both use many of the same symbols).

                    Regards,
                    Sheri
                  • Sheri
                    Alec, It didn t show up yet for some reason, but I did post such a clip. Axel, if you want to do it yourself, don t look :D I guess it will post eventually. I
                    Message 9 of 15 , Oct 11, 2006
                    • 0 Attachment
                      Alec, It didn't show up yet for some reason, but I did post such a
                      clip. Axel, if you want to do it yourself, don't look :D

                      I guess it will post eventually. I also posted it in the group's
                      Yahoo files area in an htm file. Copy the two clips one at a time in
                      MSIE or Firefox with the IE Tab extension or you will get a space on
                      the empty lines between the clips.

                      Regards,
                      Sheri

                      --- In ntb-clips@yahoogroups.com, buralex@... wrote:
                      >
                      > Axel:
                      >
                      > Axel Berger said the following on 2006-10-11 13:25:
                      > > Eric Fookes wrote:
                      > >
                      > >> Unfortunately, it is not a process that can be automated
                      reliably.
                      > >>
                      > >
                      > > Why? The parser in 4.9 could identify all these things reliably
                      and
                      > > there are very simple rules what to put in their place. If you
                      think
                      > > about sources partially in new and partially in old code I
                      agree, but
                      > > else the old parser should manage just fine.
                      > > (N.B: I want to learn here, not criticise.)
                      > >
                      >
                      > Axel: I think you are probably right that it can and should be
                      done :)
                      >
                      > How about writing a clip yourself (using the "new" regexp syntax
                      would
                      > probably be best) which will convert Find and Replace statements
                      found
                      > in any clb file from 4.95 syntax to 5.0 syntax? It sounds as if
                      you
                      > probably have a pretty fair sample set yourself and a handle on
                      what the
                      > differences are already?
                      >
                      > If you code a first stab at it, I'm sure the rest of us self-
                      proclaimed
                      > regex wizards will pitch in to validate it against our own clips
                      (at
                      > least those that haven't already been converted). I'm fairly sure
                      that
                      > all the ones that are included with the base distribution have
                      already
                      > been converted, but since they are AFAIK mostly Jody's work and
                      he's not
                      > as yet a big fan of Regex there may not be that many examples.
                      >
                      > Don (Htmlfixit) has an extensive library of "published" clips as
                      well.
                      > Don - How much do your clips use Regex?
                      >
                      > Regards ... Alec -- buralex-gmail
                      > --
                    • Axel Berger
                      ... Sorry to have mislead you there. My first ever clip roughly coincides with my first message here, which was on Aug 31st this year. So I never ever had to
                      Message 10 of 15 , Oct 12, 2006
                      • 0 Attachment
                        buralex@... wrote:
                        > It sounds as if you probably have a pretty fair sample set
                        > yourself and a handle on what the differences are already?

                        Sorry to have mislead you there. My first ever clip roughly coincides
                        with my first message here, which was on Aug 31st this year. So I never
                        ever had to deal with the old syntax. It's just that being a newbie I
                        have read the helpfiles more closely and more often than an old hand
                        would and seen the differences listed.

                        Axel
                      • dave
                        Hi thankyou all it now works. THANKYOU DAVE M ... From: Sheri To: Sent: Thursday, October 12,
                        Message 11 of 15 , Oct 13, 2006
                        • 0 Attachment
                          Hi
                          thankyou all it now works.
                          THANKYOU DAVE M

                          ----- Original Message -----
                          From: "Sheri" <silvermoonwoman@...>
                          To: <ntb-clips@yahoogroups.com>
                          Sent: Thursday, October 12, 2006 12:38 AM
                          Subject: Re: [Clip] cdplayer sort


                          > --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
                          >> You might try the 2 replacement lines below. In V5 'CRLF' is
                          >> now '\r\n' and backslash is replaced with '$' when designating
                          >> specific groups/units to use.
                          >>
                          >> If this doesn't work you might try changing the curly braces to
                          >> parens [...]
                          >
                          > Harvey is exactly right but all of the above are needed to convert the
                          > old regexp to new. Try substituting the appropriate lines with the
                          > ones below.
                          >
                          > ^!Replace "(\[.*\])\r\nartist=(.*)\r\ntitle=(.*)\r\n" >> "\r\nH="$2
                          > $3"\r\n$1\nartist=$2\r\ntitle=$3\r\n" AIRS
                          >
                          > ^!Replace "\r\nH=\".*\"\r\n" >> "^%Empty%" AIRS
                          >
                          > Regards,
                          > Sheri
                          >
                          >
                          >
                          >
                          >
                          > Fookes Software: http://www.fookes.us, http://www.fookes.com
                          > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                          >
                          > Yahoo! Groups Links
                          >
                          >
                          >
                          >
                          >
                          >
                        • Sheri
                          ... Hi Dave, I missed changing one of the n s to r n in my manual conversion which you quoted (above). You should change the n in front of artist= to
                          Message 12 of 15 , Oct 13, 2006
                          • 0 Attachment
                            --- In ntb-clips@yahoogroups.com, "dave" <dmc43959@...> wrote:
                            --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...>
                            wrote:

                            > > ^!Replace "(\[.*\])\r\nartist=(.*)\r\ntitle=(.*)\r\n"
                            >> "\r\nH="$2
                            > > $3"\r\n$1\nartist=$2\r\ntitle=$3\r\n" AIRS
                            > >
                            > > ^!Replace "\r\nH=\".*\"\r\n" >> "^%Empty%" AIRS

                            Hi Dave,

                            I missed changing one of the \n's to \r\n in my "manual" conversion
                            which you quoted (above). You should change the \n in front of
                            artist= to \r\n. Sorry about that, it may not be reliable without
                            the change. Or try my conversion clips on the original (definitely
                            better than making spot changes as I did previously).

                            Regards,
                            Sheri
                          Your message has been successfully submitted and would be delivered to recipients shortly.