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

RE: [Clip] Need to extract surnames; The DOM vs reg exp

Expand Messages
  • Piotr Bienkowski
    Wonded why my message popped up with a few days delay... :(
    Message 1 of 30 , Feb 1, 2001
    • 0 Attachment
      Wonded why my message popped up with a few days' delay... :(

      On 25 Jan 2001, at 11:33, Piotr Bienkowski wrote:

      > On 18 Jan 2001, at 11:19, Grant wrote:
      >
      > > If you want to take a look posted a DOM way to do this on the
      > > Notetab html list. subj: Extracting table data with the DOM Have
      > > heard 'reg exp' losing favour because of the power of the DOM. It
      > > certainly is a lot more intuitive than writing a reg exp to do the
      > > same thing. So if you want to check it out have a look.
      > >
      > >
      > Hi,
      >
      > I take interest in both DOM and regexes. DOM can get you the contents
      > of a tag, but can it check if these contens match a particular
      > pattern?
      >
      > Piotr
      >
    • Grant
      ... No it can t, but using reg exp to extract a tables first col surnames in an html doc is like using a chainsaw to cut butter. In comparison it took me about
      Message 2 of 30 , Feb 1, 2001
      • 0 Attachment
        > > If you want to take a look posted a DOM way to do this on the Notetab
        > > html list. subj: Extracting table data with the DOM Have heard 'reg
        > > exp' losing favour because of the power of the DOM. It certainly is a
        > > lot more intuitive than writing a reg exp to do the same thing. So if
        > > you want to check it out have a look.

        > I take interest in both DOM and regexes. DOM can get you the contents
        > of a tag, but can it check if these contents match a particular
        > pattern?

        No it can't, but using reg exp to extract a tables first col surnames in an
        html doc is like using a chainsaw to cut butter.
        In comparison it took me about 5 minutes to write that dom script to extract
        the tables first collum data because it's the right tool for this job.
        The dom provides an easy way to navigate text marked up with html or xhtml
        or xml while Reg expressions are good at finding patterns in the
        unstructured text. They are not competing technologies but complementary.
        Working with the dom I'm not pattern matching but working directly with the
        documents structured objects.
        the tables collection of rows and the first child of each row, to get the
        first td column.
        Having extracted the first col, if I want to find all the 'parkers' in that
        extracted data then using reg ex is handy.
      • Jody
        Hi Martha, ... It has been so long now I forget what it was and can t find it. I know it worked on whatever you sent in. At the present I do not have time for
        Message 3 of 30 , Feb 1, 2001
        • 0 Attachment
          Hi Martha,

          >I tried this, too. It stripped the HTML tags but it left
          >everything in a single column. I could take out several of them
          >but not all, by using search and replace. This can't be what you
          >mean because it took me more than a few seconds. Would you
          >please be a little more specific about what I need to do?

          It has been so long now I forget what it was and can't find it.
          I know it worked on whatever you sent in. At the present I do
          not have time for it though. Maybe the others are not working
          for you either because what you are sending in is not the same as
          what you are running the Clip over.

          I just saw you got it another way, so whatever works! :)

          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@yahoogroups.com
          mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
          http://www.egroups.com/group/ntb-clips
        • Piotr Bienkowski
          ... Righto! Chisels are not for fixing tractors. :) Piotr
          Message 4 of 30 , Feb 3, 2001
          • 0 Attachment
            On 2 Feb 2001, at 10:22, Grant wrote:

            > No it can't, but using reg exp to extract a tables first col surnames
            > in an html doc is like using a chainsaw to cut butter. In comparison
            > it took me about 5 minutes to write that dom script to extract the
            > tables first collum data because it's the right tool for this job.

            Righto! Chisels are not for fixing tractors. :)

            Piotr
          • Jody
            Hi Piotr, ... It appears a few of them just got spit out. ... Happy Clip n! Jody http://www.notetab.net Subscribe, UnSubscribe, Options
            Message 5 of 30 , Feb 5, 2001
            • 0 Attachment
              Hi Piotr,

              >Wonded why my message popped up with a few days' delay... :(

              It appears a few of them just got spit out.

              > > If you want to take a look posted a DOM way to do this on the
              > > Notetab html list. subj: Extracting table data with the DOM
              > > Have heard 'reg exp' losing favour because of the power of the
              > > DOM.

              Happy Clip'n!
              Jody

              http://www.notetab.net

              Subscribe, UnSubscribe, Options
              mailto:Ntb-Clips-Subscribe@yahoogroups.com
              mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
              http://www.egroups.com/group/ntb-clips
            • Luuk.Houwen@t-online.de
              I would like to count the number of times my program gies through a loop. I tried the following line within the loop, but it does not work. Any ideas about
              Message 6 of 30 , Feb 5, 2001
              • 0 Attachment
                I would like to count the number of times my program gies through a loop. I
                tried the following line within the loop, but it does not work. Any ideas
                about improving it?

                ^!Set %Counter%=^$Calc(x=x+1)$

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