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

8883Re: Please: Could someone help me with a Regular Expression?

Expand Messages
  • silvermoonwoman2001
    Aug 10, 2002
    • 0 Attachment
      --- In ntb-clips@y..., "steveadausa" <steveadausa@y...> wrote:
      > Hi Everybody,
      >
      > I would really appreciate some help with a regular expression.
      >
      > From "text sample 1" below, I would like my clip to "Find"
      everything
      > from the first instance of "CHORD DISTANCE OF" until it encounters
      > the first semicolon.

      If it doesn't matter what is found, as long as it isn't a semicolon,
      you can do it like this:

      CHORD DISTANCE OF[^;]*

      What's in the brackets means not a semicolon. The asterisk means any
      number (including zero) of non-semicolons. A plus would mean at
      least one non-semicolon. Looking at your sample, there are multiple
      spaces between CHORD and DISTANCE. If you highlight your text and
      select from the menu {Modify|Spaces|Single Space} it will make those
      spaces more predictable.

      Cheers,
      Sheri

      >
      > text sample 1:
      >
      > THENCE EASTERLY ON THE ARC OF A CURVE CONCAVE TO THE SOUTHERLY AND
      > HAVING A RADIUS OF 330.00 FEET, RUN A CHORD DISTANCE OF 127.54
      FEET
      > TO THE SOUTHWEST CORNER OF TRACT "A", GLENHAVEN, ACCORDING TO PLAT
      > BOOK 35, PAGES 16 THROUGH 21, OF SAID PUBLIC RECORDS, THE BEARING
      OF
      > SAID CHORD BEING NORTH 85 DEGREES 15 MINUTES 43 SECONDS EAST;
      THENCE
      > SOUTHWESTERLY ON THE ARC OF A CURVE CONCAVE TO THE
      SOUTHEASTERLY
      > AND HAVING A RADIUS OF 30.00 FEET, RUN A CHORD DISTANCE OF 42.43
      > FEET TO THE EASTERLY LINE OF COUNTY ROAD NO. C-739 (HENLEY ROAD),
      > THE BEARING OF SAID CHORD BEING SOUTH 45 DEGREES 17 MINUTES
      > 07 SECONDS WEST;
      >
      > First, let me show you something I can already do:
      >
      > ^!Find "CHORD +DISTANCE +OF \d+.\d+ +FEET[A-Z0-9\s\,]+;" SR
      >
      > will do the job if I have a simpler text sample, i.e.:
      >
      > text sample 2:
      >
      > THENCE NORTHWESTERLY ON THE ARC OF A CURVE CONCAVE TO THE
      > SOUTHWESTERLY AND HAVING A RADIUS OF 480.00 FEET, RUN A CHORD
      > DISTANCE OF 328.06 FEET, THE BEARING OF SAID CHORD BEING NORTH 31
      > DEGREES 49 MINUTES 19 SECONDS WEST;
      >
      > but that clip will not find anything on text sample 1.
      >
      > So, I hacked out another clip and tried it on text sample 1:
      >
      > ^!Find "CHORD +DISTANCE +OF \d+.\d+ +FEET.*;" SR
      >
      > but that "Find" does not stop at the the first instance of a
      > semicolon,
      > it includes all text until the_very_last semicolon.
      >
      > I have tried tweaking this clip for 4 hours (okay, so I'm not a
      > genius),
      > but I can't get it right. Can anyone help me with this?
      >
      > Thank you very much,
      >
      > Steve Adams (NTP 4.9)
    • Show all 2 messages in this topic