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

8756Re: [Clip] Re: Is this possible? to distinguish words in file

Expand Messages
  • Alan C.
    Jul 12, 2002
      Hi Steve, Don,

      >that's why I think I need to find "DEGREES" or "DEGREE" to latch onto
      >and work from there...

      enclosed clip does what you want. Uses



      each of those for its begin of line criteria. And, uses


      as its end of line criteria. Then near end of clip does allows to keep only those items containing



      No regex in this clip. Regex definitely could be applicable here. But this clip is fast on your sample.

      currently (but fixable) it does leave one ran together


      clip follows.

      H="test parse"
      ^!Set %WordWrap%=^$IsWordWrap$
      ^!Jump DOC_START
      ^!Replace "SOUTH" >> "^pSOUTH" IWSA
      ^!Jump DOC_START
      ^!Replace "NORTH" >> "^pNORTH" IWSA
      ^!Jump DOC_START
      ^!Replace "^%SPACE%^%SPACE%" >> "^%SPACE%" IWSA
      ^!SetWordWrap OFF
      ^!Jump DOC_START
      ^!SetScreenUpdate OFF
      ^!Find "FEET" IS
      ^!IfError EXITTRIMR
      ^!Jump SELECT_END
      ^!Select EOL
      ^!Replace "^$GetSelection$" >> "" IS
      ^!Goto TRIMRLOOP
      ^!Jump DOC_START
      ^!Set %LineCount%=^$GetLineCount$
      ^!Goto Skip_2
      ^!Jump +1
      ^!Select LINE
      ^!Find "DEGREES" ISH
      ^!IfError MORETRIM
      ^!If ^$GetRow$ => ^%LineCount% FINISH
      ^!Goto DEGREELOOP
      ^!Replace "^$GetSelection$" >> "^p" IS
      ^!Jump -1
      ^!Goto DEGREELOOP
      ^!Jump DOC_START
      ^!Replace "^p^p" >> "^p" IWSA
      ^!SetWordWrap ^%WordWrap%
      ; ----<end clip<<

      Regards. Alan.
    • Show all 5 messages in this topic