Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Beginning of line matching
- X-seq: zsh-users 4786
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Ian Lynagh <igloo@xxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: Beginning of line matching
- Date: Tue, 26 Mar 2002 17:26:29 +0000
- In-reply-to: <20020326123144.GA24391@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020326123144.GA24391@xxxxxxxxxxxxxxxxxxxxx>
On Mar 26, 12:31pm, Ian Lynagh wrote:
}
} I would have expected ${FOO/(#s)/X} and ${${FOO/(#m)(#s)?/X$MATCH}:-X}
} to be equivalent, but it seems that only the second one has the desired
} effect when FOO is not empty. Is there a reason the first doesn't behave
} as I expected?
AFAICT, it's because "start of string" is considered to begin with the
first real character, thus after the implicit intial empty substring.
This should probably be considered a bug.
Compare ${FOO/()/X}, and also ${FOO//()/X} ...
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author