The example "perl" regex code was pretty nasty. However, it did
feature the abililty to find any "internet-related" url that posted as
text.

If you were looking for only ftp or http url's, it should be pretty
easy to process text using the related http or ftp portions of that
regex code.

Of course, if you were looking for anyting that may be potentially
used as a link , regardless of the type of service it was requesting,
you might be a bit sorry.

Just my two bits...

Cheers,
Jonah Simpson

PS-Http regex (according to that monstrous block of jumble) = 
(?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.
)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+)
){3}))(?::(?:\d+))?)(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F
\d]{2}))|[;:@&=])*)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{
2}))|[;:@&=])*))*)(?:\?(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-fA-F\d]{
2}))|[;:@&=])*))?)?)

PSPS-ftp regex (according to that monstrous block of jumble) =
(?:ftp://(?:(?:(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?
:%[a-fA-F\d]{2}))|[;?&=])*)(?::(?:(?:(?:[a-zA-Z\d$\-_.+!*'(),]|(?:%[a-
fA-F\d]{2}))|[;?&=])*))?@)?(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-
)*[a-zA-Z\d])?)\.)*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?
:\d+)(?:\.(?:\d+)){3}))(?::(?:\d+))?))(?:/(?:(?:(?:(?:[a-zA-Z\d$\-_.+!
*'(),]|(?:%[a-fA-F\d]{2}))|[?:@&=])*)(?:/(?:(?:(?:[a-zA-Z\d$\-_.+!*'()
,]|(?:%[a-fA-F\d]{2}))

On Thu, 17 Feb 2005 18:59:52 +1100, Jason Schulz <[EMAIL PROTECTED]> wrote:
> On a more useful note that my previous:
> 
> <@assign request$str "visit http://www.google.com/modules/default.taf
> now">
> <@assign request$expr "http?://[^ ]*">
> <@regex str="@@request$str" expr="@@request$expr" type="e">
> 
> will return
> 
> http://www.google.com/modules/default.taf
> 
> Since the expression is looking for the first space to terminate the
> url, it will include any punctuation (think url at end of sentence, the
> full stop will be included) and if the url spans multiple lines, the
> line returns will also be included.
> 
> J.
> 
> 
> On 16/02/2005, at 11:39 PM, [EMAIL PROTECTED] wrote:
> 
> >> The challenge is to find the string that represents an URL, which
> >> begins
> >> with http:// and ends with the first space after that.
> 
> WITH IMAGINATION
> Planning, Implementation and Management of Web Applications
> 
> 160 Pacific Highway North Sydney NSW Australia 2060
> phone + 612 9929 9229 fax + 612 9460 4770 
> web - www.wi.com.au email -  [EMAIL PROTECTED]
> 
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to