cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Finding library regex

From: 王 臻 <writewang_at_hotmail.com>
Date: Sat, 19 Oct 2002 09:59:38 +0800

Thank you Spies. But the fact is I'm using VC++ and want to get a
library(static or dynamic) with mutithread-safe capacity or a C++ class so
I can use in my project to extracts the links from html file.

>From: Soren Spies <sspies_at_apple.com>
>Reply-To: curl-library_at_lists.sourceforge.net
>To: curl-library_at_lists.sourceforge.net
>Subject: Re: Finding library regex
>Date: Fri, 18 Oct 2002 17:59:05 -0700
>
>
>On Friday, Oct 18, 2002, at 17:48 US/Pacific, 墹 鋔 wrote:
>
>> Since curl do not extract links from html file. I wanna use regex
>>to parse it. Anyone knows where can I find it, or any better way to
>>extract links? Thanks in advance.
>
>Here is a shell function I used to extract URLs from the default
>apache file listing (no index.html or equivalent). You can probably
>adapt it a bit to extract any link?
>
>listurls() {
> baseurl="$1"
> [[ "$baseurl" != */ ]] && baseurl="${baseurl}/"
> #echo baseurl: $baseurl >&2
> $WGET $WGETCATOPTS "$baseurl"|sed -n '
> /\[ \]/s!.*HREF="\([^"]*\).*$!'"$baseurl"'\1!p
> /\[DIR\]/s!.*HREF="/\([^"]*\).*$!'"$baseurl"'!p
> /\[DIR\]/s!.*HREF="\([^"]*\).*$!'"$baseurl"'\1!p'
>}
>
>$WGET is usually curl, but for older OS X (where the function was
>first written), it was GNU's wget.
> WGETCATOPTS="-L"
>for curl
> WGETCATOPTS="-nv -O -"
>for wget.
>
>--
>Soren Spies
>Apple Computer, Inc.
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:
>Access Your PC Securely with GoToMyPC. Try Free Now
>https://www.gotomypc.com/s/OSND/DD

_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。 http://www.hotmail.com

-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
Received on 2002-10-19