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

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

Expand Messages
  • steveadausa
    Hi Don,
    Message 1 of 5 , Jul 12, 2002
    • 0 Attachment
      Hi Don,

      << so what you really want to do is find north or south, go to the
      next
      << semi-colon and add a return instead, deleting the thence's

      Well, not exactly. There will be some extra "north or south"'s

      i.e. " THENCE ON THE
      NORTH LINE THEREOF RUN THE FOLLOWING 2 COURSES: 1) NORTH 86 DEGREES
      35
      MINUTES 17 SECONDS WEST 1210.10 FEET TO THE POINT OF BEGINNING;

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

      << is "thence" always in your descriptions ...

      not in every call

      <<and are they always complete, ie full degree/minute/seconds calls?

      Yes

      Thanks,

      Steve Adams (NTP 4.9)
    • Alan C.
      Hi Steve, Don, ... enclosed clip does what you want. Uses NORTH SOUTH each of those for its begin of line criteria. And, uses FEET as its end of line
      Message 2 of 5 , Jul 12, 2002
      • 0 Attachment
        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

        NORTH

        SOUTH

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

        FEET

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

        DEGREES

        --

        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

        35MINUTES

        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
        :TRIMRLOOP
        ^!Find "FEET" IS
        ^!IfError EXITTRIMR
        ^!Jump SELECT_END
        ^!Select EOL
        ^!Replace "^$GetSelection$" >> "" IS
        ^!Goto TRIMRLOOP
        :EXITTRIMR
        ^!Jump DOC_START
        ^!Set %LineCount%=^$GetLineCount$
        ^!Goto Skip_2
        :DEGREELOOP
        ^!Jump +1
        ^!Select LINE
        ^!Find "DEGREES" ISH
        ^!IfError MORETRIM
        ^!If ^$GetRow$ => ^%LineCount% FINISH
        ^!Goto DEGREELOOP
        :MORETRIM
        ^!Replace "^$GetSelection$" >> "^p" IS
        ^!Jump -1
        ^!Goto DEGREELOOP
        :FINISH
        ^!Jump DOC_START
        ^!Replace "^p^p" >> "^p" IWSA
        ^!SetWordWrap ^%WordWrap%
        ; ----<end clip<<

        Regards. Alan.
      • Alan C.
        Hi, Importantly, oops, I forgot to include the very first two lines of the clip. From my earlier posted clip, the former first line must now become (as
        Message 3 of 5 , Jul 12, 2002
        • 0 Attachment
          Hi,

          Importantly, oops, I forgot to include the very first two lines of the clip.

          From my earlier posted clip, the former first line must now become (as follows) the third line with 2 NEW additional lines above it at the very top. Thus:


          ^!Jump DOC_START
          ^!Replace "^p" >> "" IWSA
          ^!Set %WordWrap%=^$IsWordWrap$


          (Those 2 NEW additional lines make your sample so that it is without line breaks which is what is needed for the remainder of the clip to work properly)

          So please be sure to add those 2 NEW lines at the very top of the clip.

          Thanks. Alan.
        • steveadausa
          That s a * beautiful * thing, Alan. Thanks. Steve
          Message 4 of 5 , Jul 12, 2002
          • 0 Attachment
            That's a * beautiful * thing, Alan. Thanks.

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