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

Re: [Clip] Processing directory of files: Solved probs, Regex woes continue

Expand Messages
  • Larry Thomas
    Hi Alan, ... Jody explained this to us several months ago and I will explain it as I understand it. It does appear that you have the syntax correct. When
    Message 1 of 2 , May 3, 2000
    • 0 Attachment
      Hi Alan,

      At 10:28 AM 05/03/2000 +0200, you wrote:
      >Hi ntb-clips,
      >
      >Further to my cry for help yesterday, Im pleased to report that I have
      >made some strides in choosing the directory and processing files in
      >turn.
      >
      >However my regular expression search and replace woes continue.
      >
      >Does anyone have some advice on using regex in notetab so that it
      >performs as intended?
      >
      >Specifically, as I mentioned in last post, I wish to choose every
      >instance of "<!--.*-->" with ""
      >
      >I hope Ive got the syntax right. the period should represent any
      >character and the asterisk should represent zero or more of any
      >character.

      Jody explained this to us several months ago and I will explain it as I
      understand it. It does appear that you have the syntax correct. When
      using regular expressions in NoteTab to replace all occurrences of a
      pattern, the search engine finds the first occurrence that matches the
      expression and then it *locks* that match in and replaces all occurrences.
      The result is that other possible regular expression matches for your
      search are not replaced. If you run the clip again it will find the next
      match and replace all occurrence of it and run it again for the next one
      and so forth. The solution to this problem is to make a looping clip like
      this.

      ^!Replace "<!--.*-->" >> "" WAS
      ^!IfError Exit Else Skip_-1

      This code will keep looping back as long as the Replace code finds the
      match. When it fails to find a match the loop will end.

      Regards,

      Larry
      larryt@...
    • Jody
      Hi Larry, ... That was fixed in one of the 4.8 versions. NoteTab now refreshes the search criteria to the original when using RegExp. The wildcards, etc.
      Message 2 of 2 , May 3, 2000
      • 0 Attachment
        Hi Larry,

        > When using regular expressions in NoteTab to replace all
        > occurrences of a pattern, the search engine finds the first
        > occurrence that matches the expression and then it *locks* that
        > match in and replaces all occurrences.

        That was fixed in one of the 4.8 versions. NoteTab now
        "refreshes" the search criteria to the original when using
        RegExp. The wildcards, etc. (if there is an etc. <g>) go
        back to their regular meaning and not the criteria that was
        found.

        Happy Clip'n!
        Jody

        http://www.sureword.com/notetab

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@...
        mailto:Ntb-Clips-UnSubscribe@...
        http://www.egroups.com/list/ntb-clips
      Your message has been successfully submitted and would be delivered to recipients shortly.