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

Re: [Clip] Clip Using RegEx to Strip ID Information

Expand Messages
  • Alan_C
    On Wednesday 03 January 2007 15:23, Wiles, Carolyn M wrote: ... All below are untested. And, if your tag(s) span lines (tag is not only on one line)
    Message 1 of 3 , Jan 3, 2007
    • 0 Attachment
      On Wednesday 03 January 2007 15:23, Wiles, Carolyn M wrote:
      <snip>
      > Here is an example (it doesn't have to be step, it could be another tag -
      > but the ID information is constantly changing):
      >
      > <step id="A00001" vid="1" fvid="1">
      >
      > What I want to do is to be able to strip from space id to the end tag for
      > every tag (in this case, I would be left with <step>). In all cases, the
      > information will be proceeded by "id" in the tag. In every case, no matter
      > how many variables are in between, I would want to strip from the id to the
      > end tag. Can someone walk me through the process of doing a clip and
      > running it on my files for a case such as this).

      All below are untested. And, if your tag(s) span lines (tag is not only on
      one line) then you need yet even a more complex regex than these.

      The below, SPACEid is *not*much** with which to use as find info (too easy
      to also match in places you don't want it to match?) -- thus, may better to
      use (be more specific) like so:

      "(<step) id.+(>)"

      or

      "(<whichever_tag) id.+(>)"

      Here's some more ideas:

      if is Version 5.1 Notetab:

      ^!Replace "(<.+) id.+(>)" >> "$1$2" RISAW

      if is version 4.95 Notetab:

      ^!Replace "{<.+} id.+{>}" >> "/1/2" RISAW

      but the 4.95 may not work adequately due to the 4.95 regex greed issue.

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