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

RE: [Clip] Re: Clip Error Question

Expand Messages
  • John Shotsky
    I tried copying to a completely new document with a different name, and got the same problem. I removed the T with no change. The pattern is irrevalent. It
    Message 1 of 6 , May 9, 2011
    • 0 Attachment
      I tried copying to a completely new document with a different name, and got the same problem. I removed the T with no
      change.

      The pattern is irrevalent. It doesn't matter what is in the text file, even just a few words is sufficient to cause the
      problem. I just tried it with a blank doc and got the same error. But, the pattern is LLLLNNL, case insensitive, which
      is a Prodigy ID.



      My clip library is over 900K, which may play into it. It will be reduced by about 1/3 as I finish rewriting it. The
      funny part is that if I copy just the active lines to a new clip, it doesn't happen. And, if I either remove the caret,
      or enclose the first range in parens, the problem is gone.



      I don't have another version installed, and don't want to upset my install by installing another version. I'm on Win7-64
      bit. 8G memory, Quad core.



      Regards,

      John

      <http://recipetools.gotdns.com/> RecipeTools site

      <http://groups.yahoo.com/group/RecipeTools/> RecipeTools Yahoo group

      <http://shotsky.gotdns.com/index.htm> Beaverton Weather



      From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of Sheri
      Sent: Monday, May 09, 2011 19:58
      To: ntb-clips@yahoogroups.com
      Subject: [Clip] Re: Clip Error Question





      --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , "John Shotsky" <jshotsky@...> wrote:
      >
      > My question wasn't really so much about how to fix this problem, but to tell me if I was doing something wrong. I
      don't
      > think I am or I wouldn't have written.

      I can't say if the pattern is wrong since I don't know what you mean it to match. The replace command as written looks
      ok except that the T option is not applicable to a replace command that is a regex.

      See if it happens on NoteTab Standard or Light. As documented in the regex.chm file, Notetab Pro does do extra
      processing when the first character of a pattern used in a clip is a caret.

      Other than that, over the years I have occasionally had a clip library become corrupted somehow. Try copying the clips
      to another library and see if still recurs.

      If it only happens on your computer, it could also possibly be hardware related. I was not able to reproduce.

      Regards,
      Sheri





      [Non-text portions of this message have been removed]
    • John Shotsky
      This problem has been solved, with the excellent detective work of Dio. The cause of the problem occurs in a line that is after the GoTo Exit that I placed to
      Message 2 of 6 , May 10, 2011
      • 0 Attachment
        This problem has been solved, with the excellent detective work of Dio. The cause of the problem occurs in a line that
        is after the GoTo Exit that I placed to stop operation, which is why I would not have looked past that point. In this
        case, that other line has a caret inside a character class:



        ^!Replace "\b(\d{3})[\"\'\*~\^](\x20|\.|\))" >> "$1°$2" ARSTW



        That character, just by being before the ], and even though it is escaped, causes NT to misconstrue the ], which then
        causes the problem way upstream. The solution is to use the hex notation, or move the caret away from the ]. Apparently,
        NT reads the entire clip library, and somehow gets confused with that caret in that location.



        If you're wondering what that clip does, it replaces some of the different symbols I've found that people use for the
        degree symbol in recipes with the real degree symbol. Others are fixed at the character level, but these need context to
        detect them.



        Thanks again Dio and all,

        John



        From: John Shotsky [mailto:jshotsky@...]
        Sent: Monday, May 09, 2011 10:05
        To: ntb-clips@yahoogroups.com
        Subject: Clip Error Question



        I am getting a syntax error on a clip but I don't understand what I'm doing wrong.

        The clip is supposed to remove brackets around a period [.] when followed by a specific pattern.

        The \K is in place to not capture the first part, and parens are around the second part to capture it.

        However, if I don't use parens around the first range, it gives an error

        ^!Replace "^[\dA-Z].+\K\[\.\](.+[A-Za-z][A-Za-z][A-Za-z][A-Za-z]\d\d[A-Za-z])" >> "\.$1" AIRSTW



        If I put parens around the first range, it works normally.

        ^!Replace "^([\dA-Z]).+\K\[\.\](.+[A-Za-z][A-Za-z][A-Za-z][A-Za-z]\d\d[A-Za-z])" >> "\.$2" AIRSTW



        If I remove the caret ^, it also doesn't produce an error without the parens.



        Note that the pattern I'm trying to capture isn't present in the text – this is a clip syntax error. As I look at the
        error string, it is clear that the first [ is being interpreted as a literal character instead of the beginning of a
        range, because it gives a number followed by the close range. (]) (and then all the other ranges do the same thing.) I
        don't know if that's my error or a NoteTab error. Can you not reliably start a range at the beginning of a line unless
        it is within parens?



        This all came about as I was doing some code cleanup, removing parens before \K when not needed. When I tested, this
        came up, and replacing the parens or removing the caret were the only ways to get it to work. I looked in the help but
        didn't see anything that applied.



        Oh, and by the way, it would be great if error messages could by copied as text…



        Thanks,

        John





        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.