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

Subject: Re: Need to extract surnames

Expand Messages
  • h.paulissen
    ... the last two indexes the way ... there was an easier way. ... You could try opening the HTML document in Excel. The table itself is imported into colums,
    Message 1 of 6 , Jan 25, 2001
      > From: Martha Hambrick Harrell <mehharrell@...>
      > Subject: Re: Need to extract surnames

      > Thanks, Harvey & Jody

      > We are talking about hundreds of names here. I had done
      the last two indexes the way
      > Harvey suggested. It takes soooo long. I was just hoping
      there was an easier way.
      > Thank you both.

      > Martha


      You could try opening the HTML document in Excel. The table
      itself is imported into colums, from which you can select
      the names only.

      The two other suggestions (Eb's corrected version did not
      work for me either) and the "the DOM" from the HTMLlist
      didn't give any results. The latter requires other resources
      apparently, which I have not available. The code in this
      clip goes beyond me. Additional explanations are welcome.

      Hugo Paulissen
    • Jody
      Hi Martha, Harvey, and all, ... The Clip I sent should work just fine. Just do it o a copy of the file. Happy Clip n! Jody http://www.notetab.net Subscribe,
      Message 2 of 6 , Jan 25, 2001
        Hi Martha, Harvey, and all,

        > We are talking about hundreds of names here. I had done the
        > last two indexes the way Harvey suggested. It takes soooo
        > long. I was just hoping there was an easier way.

        The Clip I sent should work just fine. Just do it o a copy of
        the file.

        Happy Clip'n!
        Jody

        http://www.notetab.net

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@...
        mailto:Ntb-Clips-UnSubscribe@...
        http://www.egroups.com/group/ntb-clips
      • Eb Guenther
        Hi Hugo, Martha, Let me re post the entire, corrected clip, with an ^!Info inserted to stop for each found name, AND this is a freshly tested version .
        Message 3 of 6 , Jan 25, 2001
          Hi Hugo, Martha,

          Let me re post the entire, corrected clip, with an ^!Info inserted to stop
          for each found name, AND this is a freshly tested version <g>.

          H=GetNameFromHtml
          :loop
          ^!Find <TD [^/]+>[^,]+,[^<]*</TD> RSI
          ^!IfError Done
          ^!Set %name%=^$StrStripHTML("^$GetSelection$";0)$
          ^!Set %Lname%=^$StrCopy(^%name%;1;^$StrPos(",";^%name%;1)$)$
          ^!Set %Lname%=^$StrDeleteRight(^%Lname%;1)$
          ^!Info [L]Name found: ^%Lname%
          ;replace above with "^!InsertText ^%Lname%^%NL%
          ^!Goto loop
          :Done

          This clip works on NT, and Windows 95 (OEM).

          h.paulissen wrote:
          > > Harvey suggested. It takes soooo long. I was just hoping
          >there was an easier way.


          Just replace the ^!Info tag with your procedure for processing the name.


          >The two other suggestions (Eb's corrected version did not
          >work for me either)

          Hugo, Could you please do me a favor and try the above clip again, and if
          it doesn't work, post what platform you tested it on? I want to know about
          any platform issues relating to regular expressions, and I'm sure Eric
          does, too.

          Thanks,

          Eb
        • Martha Hambrick Harrell
          Thank you very much, Hugh! It worked like a charm! : ) Martha
          Message 4 of 6 , Jan 25, 2001
            Thank you very much, Hugh! It worked like a charm! :>)

            Martha


            "h.paulissen" wrote:

            > > From: Martha Hambrick Harrell <mehharrell@...>
            > > Subject: Re: Need to extract surnames
            >
            > > Thanks, Harvey & Jody
            >
            > > We are talking about hundreds of names here. I had done
            > the last two indexes the way
            > > Harvey suggested. It takes soooo long. I was just hoping
            > there was an easier way.
            > > Thank you both.
            >
            > > Martha
            >
            > You could try opening the HTML document in Excel. The table
            > itself is imported into colums, from which you can select
            > the names only.
            >
            > The two other suggestions (Eb's corrected version did not
            > work for me either) and the "the DOM" from the HTMLlist
            > didn't give any results. The latter requires other resources
            > apparently, which I have not available. The code in this
            > clip goes beyond me. Additional explanations are welcome.
            >
            > Hugo Paulissen
          • Jody
            Hi Eb ... I find regular expressions very slow and only use them when there is no other way. I did one the other days that took about 5 minutes compared to
            Message 5 of 6 , Jan 26, 2001
              Hi Eb

              >^!Find <TD [^/]+>[^,]+,[^<]*</TD> RSI

              >Hugo, Could you please do me a favor and try the above clip again, and if
              >it doesn't work, post what platform you tested it on? I want to know about
              >any platform issues relating to regular expressions, and I'm sure Eric
              >does, too.

              I find regular expressions very slow and only use them when there is no other way. I did one the other days that took about 5 minutes compared to NoteTab's code and by the tine id was done a I showed 4KB of resources have to reboot to get them back. NoteTab's code took about 50KB and I got that back on a restart of NoteTab.

              Happy Clip'n!
              Jody

              http://www.notetab.net

              Subscribe, UnSubscribe, Options
              mailto:Ntb-Clips-Subscribe@...
              mailto:Ntb-Clips-UnSubscribe@...
              http://www.egroups.com/group/ntb-clips
            • h.paulissen@facburfdcw.unimaas.nl
              Hello Eb, There was nothing wrong with your clip: the original just found the names, but didn t show them. Your version with the Info/Insert line deals with
              Message 6 of 6 , Jan 26, 2001
                Hello Eb,


                There was nothing wrong with your clip: the original just found the
                names, but didn't show them. Your version with the Info/Insert line
                deals with that.

                So, the clip works on Windows 98 as well.

                Hugo

                --- In ntb-clips@y..., Eb Guenther <ebg@m...> wrote:

                >
                > Let me re post the entire, corrected clip, with an ^!Info inserted
                to stop
                > for each found name, AND this is a freshly tested version <g>.
                >
                > H=GetNameFromHtml
                > :loop
                > ^!Find <TD [^/]+>[^,]+,[^<]*</TD> RSI
                > ^!IfError Done
                > ^!Set %name%=^$StrStripHTML("^$GetSelection$";0)$
                > ^!Set %Lname%=^$StrCopy(^%name%;1;^$StrPos(",";^%name%;1)$)$
                > ^!Set %Lname%=^$StrDeleteRight(^%Lname%;1)$
                > ^!Info [L]Name found: ^%Lname%
                > ;replace above with "^!InsertText ^%Lname%^%NL%
                > ^!Goto loop
                > :Done
                >
                > This clip works on NT, and Windows 95 (OEM).
                >
                > h.paulissen wrote:
                > > > Harvey suggested. It takes soooo long. I was just hoping
                > >there was an easier way.
                >
                >
                > Just replace the ^!Info tag with your procedure for processing the
                name.
                >
                >
                > >The two other suggestions (Eb's corrected version did not
                > >work for me either)
                >
                > Hugo, Could you please do me a favor and try the above clip again,
                and if
                > it doesn't work, post what platform you tested it on? I want to
                know about
                > any platform issues relating to regular expressions, and I'm sure
                Eric
                > does, too.
                >
                > Thanks,
                >
                > Eb
              Your message has been successfully submitted and would be delivered to recipients shortly.