[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Re: Searching for HTML




Ummmm... does this work:

$buff =~ m/(\<select name=\\\"fromlist\\\".*?\<\/select\>)/;
print $1, "\n";

I don't have any of the references with me right now, so you may not need
to escape the angle brackets, but I don't think it hurts...

Also, if the construct spans multiple lines (which selects usually do), I
think you may have to add a character after that final '/' and before the
';', but I'm don't remember off the top of my head which one -- 'm', perhaps?

HTH,
Ricky

Michael Eggleston <nghtstr@michaelsmacshack.com> wrote:

>Hi yall!!!
>
>
>I have a (hopefully) easy question.  I am trying to search for a HTML tag 
>explicitly.  It's not working, and I think its because Perl is treating 
>the enclosed <...> as a File Handle.  Here is the string I am looking for:
>
><select name=\"fromlist\".*?</select>
>
>An entire HTML document was read in and stored into a scalar value named 
>$buff.  Please help me.

-----
Pukku
Nothing I say necessarily represents my, or anyone else's, opinions.
I reserve the right to change my mind even in mid-thought.
All spelling errors are copyright by the author, and are intentional

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org