Skip to main content.
home | support | download

Back to List Archive

Re: Re: Regex in ReplaceRules

From: Earl Fogel <fogel(at)not-real.duke.usask.ca>
Date: Wed Nov 04 1998 - 17:46:02 GMT
Try this:

    ReplaceRules replace ".*/" "http://host/cgi-bin/concordance/"

It should replace everything up to and including the last slash.

Earl
-

On Wed, 4 Nov 1998, Ed Burns wrote:

>On Wed, 4 November 08:48:13, Ron Klatchko wrote:
>> Ed Burns wrote:
>> > ReplaceRules replace "/usr/web/htdocs/.*" "http://host/cgi-bin/concordance/"
>> > Does anyone know how to get the desired behavior?
>> 
>> Why don't you try:
>> 
>> ReplaceRules replace "/usr/web/htdocs/"
>> "http://host/cgi-bin/concordance/"
>
>Because that won't handle all the stuff after /usr/web/htdocs.
>
>I did try this, and got something like
>
>given path /usr/web/htdocs/content/books/00304a.html
>
>I get
>
>http://host/cgi-bin/concordance/content/books/00304a.html
>
>when I wanted
>
>http://host/cgi-bin/concordance/00304a.html
>
>Any other ideas?
>
>Ed
>
Received on Wed Nov 4 09:56:41 1998