Subject: Re: MBEGIN, MEND in #m when pattern has "|"
From: Bart Schaefer <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Thu, 2 Jun 2016 15:11:23 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

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.