On Fri, 27 Aug 2004, Uriel Wittenberg wrote:

> Date: Fri, 27 Aug 2004 10:23:57 -0400
> From: Uriel Wittenberg <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: [analog-help] http://www.[anysite] = http://[anysite]
> 
> > REFALIAS http://www.* http://*
> 
> But that translates
> 
> http://www.[anysite] to http://[anysite]
> 
> , which is sometimes wrong.

Hi-
It's also sometimes wrong to add a www. For instance, what if it's a page 
on MIT's web site? (http://web.mit.edu/). There really is no easy way to 
combine the entries.

> 
> I'd like the translation to go the other way.
> 
> >Otherwise http://www.site.com would translate to http://www.www.site.com.
> 
> It's to avoid that that I need regular expressions.
> 

I'm not sure if Analog supports full perl regular expressions, but if it does:
http://(?!www\.).*\.com
will match a URL that does not begin with www.

It might be advantageous to use this instead:
http://(?!www\.)[^.]+\.com

That will match only URLs with two parts in the hostname, hopefully fixing 
at least some of the problems that result from prepending www. 
willy-nilly.
--Quentin

+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
|  Digest version: http://lists.isite.net/listgate/analog-help-digest/
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
+------------------------------------------------------------------------

Reply via email to