Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: MBEGIN, MEND in #m when pattern has "|"
- X-seq: zsh-workers 38584
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: MBEGIN, MEND in #m when pattern has "|"
- Date: Thu, 2 Jun 2016 15:11:23 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=AiIeCALAc2n+qxMsC0WYRqw2qjmjYZ42nwrhe1arWM4=; b=zz61P6vAyXzstL0VTpaT3OvwD6c094vXl7TGEetmgHlWVGqG+D41fGZOLU7GHv8/VM MnySRS/kRz8FsWfTSPx8ycZ8yS6Dlujv6Wd1YuJ4KFGsw7pmW7f13Hw9ECtii4+QiX/M 38KdnqzV/lTS5KJIW8+PAMPcCQMK3D09kEeh/M8y8vUoTLxCIvag6zT4QnWEA94JEuJJ 7F1W01YTySpU69U2WqlB+J+Xl+Z+SVHSDvfqPShZf6QyfKfFeKzhHZVqaSxTRnpXh5V5 Jby6GrMmpWZAhAc7wj3FGrqe8xLxn/Z6vT+QAn2OdhReZ6kDZw8aSE1CJKFTJVruCwlR fycw==
- In-reply-to: <CAKc7PVDXOUzJfhQMtCuW8mknM+OzyXQzafj9BKWPHDzkxAwXLA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDXOUzJfhQMtCuW8mknM+OzyXQzafj9BKWPHDzkxAwXLA@mail.gmail.com>
On Jun 2, 7:41pm, Sebastian Gniazdowski wrote:
}
} below is a code that uses indexes set by (#m) or (#b). Turns out the
} indexes are set only when using (#b). For (#m) they are set when there
} is no "|" in the pattern. Why?
MATCH MBEGIN and MEND are set only if there is a single possible match
(more precisely, when the string can be matched with only a combination
of strcmp() and simple wildcards). In //pat/repl/, there are multiple
possible match positions; which begin and end do you want?
This probably should have been documented better.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author