Extract a <DIV> and it's contents?!

Results 1 to 4 of 4

Thread: Extract a <DIV> and it's contents?!

  1. #1
    Join Date
    Dec 1969

    Default Extract a <DIV> and it's contents?!

    I&#039ve got a div block I&#039m trying to extract from an HTML file. I&#039ve tried using <BR>"&#060;div&#062;(.*?)&#060; /div&#062;"<BR>and it&#039ll work fine if my div was all on a single line, but of course it spans multi-lines. What do I need to do the extract the whole multilined block?

  2. #2
    SPG Guest

    Default [sS]*?

    The . skips the multiline, so you have to simply ensure that no characters are excluded -- I use [sS] (all blank and non-blank characters). There&#039s been a lot of posting on this topic; I&#039m surprised it hasn&#039t become an FAQ yet. [Prod the Moderator]

  3. #3
    Richard A. Lowe Guest

    Default <div>( |.)*?</div>

    &#124.)*?&#060;/div&#062; <BR><BR>is what I use :)<BR>Richard

  4. #4
    SPG Guest

    Default Optimization Data -- Bill?

    Just wondering if anybody knows what sort of style -- such as [sS] or (
    &#124.) -- gives better performance from the engine; particularly Bill W, as he&#039s said he has some/all of the VBScript source...<BR><BR>[Yes we *could* benchmark every option everybody comes up with, but that hardly seems like a good use of our time and is hardly scientific. Of course, I&#039ve always maintained that programming is more along the lines of "Computer Voodoo" than "Computer Science"...]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts