A BIG THANK YOU!

Really,
Rachid

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 23, 2000 18:11
Subject: [REBOL] Off-topic: regular expressions Re:


>
> if it is a perl based regular expression to extract a URL
> that you want, I have a line from Kehei.com wiki.pl (the non rebol
one)
> that will find a URL either at beginning of a line, after a space or
> after a * or - . It also stops the parse at a space or a tag (<)
start.
>
> # Handle embedded URLs
>
s@(^|[\-\*\s])((news|http|ftp|gopher|https)\://([^\s<]+))@$1\<A
> href\=\"$2" target=\"_top\"\>$2<\/A\>@go;
>
> note that @ was used as a delimiter since nearly every other
> punctuation char was used already in the innards.
> s/match/repl/go; is
> s@match@repl@go;
>
>
> a discussion about doing regular expressions can be found
> in the rebol email archives at
> ThreadHead: http://rebol.org/userlist/archive/83/585.html
> ThreadTail: http://rebol.org/userlist/archive/86/224.html
>
> ;# mailto: [EMAIL PROTECTED]
>
> At 02:31 PM 9/23/00 +0200, [EMAIL PROTECTED] wrote:
> >Hello,
> >
> >I'm frustrating myself terribly, trying to extract an URL using
regular
> >expressions from the following string:
> >
> >"bla
>
><http://www.yahoo.com/blabla.html?this=insane>http://www.yahoo.com/blab
la.html?this=insane
> >- bla bla"
> >
> >Now how do I do that? I've tried and failed miserably, this is where
I
> >got: (<http://|www>http://|www).*
> >
> >Which prints out
>
>"<http://www.yahoo.com/blabla.html?this=insane>http://www.yahoo.com/bla
bla.html?this=insane
> >- bla bla" - damn these regular expressions! Rebol's 'parse is way
better
> >for this kind of thing, at least I can get 'parse to stop at the
first space!
> >
> >Thanks in advance!
> >
> >Regards,
> >Rachid
>
>

Reply via email to