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

Re: explanation

Expand Messages
  • Sheri
    ... Hi Dave, Its much easier to construct a regex to match a particular sample than to determine what one does without the benefit of a reference sample. The
    Message 1 of 2 , Nov 8, 2008
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "Dave" <dmc43959@...> wrote:
      >
      > Hi
      > could someone explain the way this works I can guess bits of it ??
      > :Loop
      > ^!Find "(?s)^(.+) - .+(^\1)+(?-s).+" RS
      > ^!IfError Finish
      > ^!Replace "(\R)^(.+) - " >> "$1 " RAHS
      > ^!Goto Loop
      > THANKYOU DAVE M
      >

      Hi Dave,

      Its much easier to construct a regex to match a particular sample than
      to determine what one does without the benefit of a reference sample.

      The pattern in the Find command was discussed here:
      <http://tech.groups.yahoo.com/group/ntb-clips/message/17161>

      The replace operates on text highlighted by the find. It replaces all
      occurrences of linebreak and characters on the next line thru hypen
      space. If there was more than one hyphen space on a following line, it
      would match up through the last one. Those matches are replaced with a
      linebreak. That effectively removes from each line in the hightlight
      all text from the start of the line through the last hypen space on
      the line.

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