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

Re: [Clip] Notetab or RegEx Bug

Expand Messages
  • Axel Berger
    ... I agree it must be a bug. In a highlighted block consisting of empty lines and one line of spaces ^!Replace ^.*([ H]).*$ xyz RH1 replaces the first
    Message 1 of 3 , Sep 4, 2013
    • 0 Attachment
      Art Kocsis wrote:
      > So is this a bug in RegEx or a bug in Notetab?
      > (tested NTB 5.8/fv & 6.2/fv).

      I agree it must be a bug. In a highlighted block consisting of empty
      lines and one line of spaces

      ^!Replace "^.*([\H]).*$" >> "xyz" RH1

      replaces the first newline in the block.

      Axel
    • Ian NTnerd
      Art, Please give some more context. 1. Failed list 2. passing list 3. How are you capturing the error condition from the find? What code? I use Find to
      Message 2 of 3 , Sep 4, 2013
      • 0 Attachment
        Art,

        Please give some more context.
        1. Failed list
        2. passing list
        3. How are you capturing the "error condition" from the find? What code? I use "Find" to find things or not. Where does the "error condition" come in. Please help me go deeper here?
        4. Why the RH? Regex R of course, but are you looking at whole document W or only a selection H?

        "should throw an error condition for any line consisting solely of horizontal white space"
        I read the line above to be saying find (throw error??)

        ^!find "^\h+\r\n" RH
        or
        ^!find "^\h+$" RH

        That finds empty lines.


        Ian



        On 4/09/2013 11:14 PM, Art Kocsis wrote:
         

        This sure looks like a bug to me but I am not sure whose responsibility so am dual posting to clips and scripts.

        The statement:

        ^!Find "^.*[\H].*$" RH (or equivalent) ^!Find "^.*[^\h].*$" RH

        should throw an error condition for any line consisting solely of horizontal white space (HT, NBSP, SP), such as spaces, but it does not.

        Trying to isolate the "found" non-white space character via

        ^!Find "^.*\K[\H](?=.*)$" RH (or equivalent) ^!Find "^.*\K[^\h](?=.*)$" RH

        results in no matches but no error condition either.

        Substituting an "S" or "s" for "H" or "h" respectively yields the correct results.
        However, the "S" meta character includes vertical white space characters (LF, VT, CR, NL) which is not always wanted.

        So is this a bug in RegEx or a bug in Notetab? (tested NTB 5.8/fv & 6.2/fv).

        Art


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