From: Tobias DiPasquale Date: 2002-03-24T04:20:27+09:00 Subject: extracting multi-line tags? Hi all, I was recently wondering if there was a straightforward way to match tags in a web page where the tags might span multiple lines? What I want to do is the following: 1. download the page (I can do that already, with Net::HTTP) 2. scan it for the following pattern: | Something Here | These tags can (and do) span multiple lines. NOTE: What I mean here is that I would like to match the beginning of the a href tag as one "token", then put the contents of the tag in another token, while putting the closer tag in yet another token. The vertical bars are simply to show this idea. I was trying a variety of combinations of String.split and String.each_line w/matching regexps but none of them seem to be working for me. Is this a job for a regular expression (or several of them), or does it require a context-free grammar to match (i.e. the use of a parser, such as Bison or whatnot)? Thanks in advance!! -- << T o b i a s D i P a s q u a l e >> mailto: anany@ece.villanova.edu