cURL / Mailing Lists / curl-library / Single Mail


Re: Finding library regex

From: 王 臻 <>
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 <>
>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.
>for curl
> WGETCATOPTS="-nv -O -"
>for wget.
>Soren Spies
>Apple Computer, Inc.
>This email is sponsored by:
>Access Your PC Securely with GoToMyPC. Try Free Now

享用世界上最大的电子邮件系统— MSN Hotmail。

This email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
Received on 2002-10-19