Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zregexparse



PS. I've examined if zregexparse could be use to fill region_highlight, and it seems it can't:

zregexparse p1 p2 abc \( '/bc|?/' '{print "$p1, $p2, $mbegin[1], $mend[1], $match[1]"}' \) \#
1, 1, 1, 1, a
3, 3, 1, 2, bc

The "|?" is needed, otherwise "bc" will not be matched – no substring matching. $p1, $p2 are quite veird values, rather not usable as mbegin/mend (except if they are mend, then mbegin could be computed using $#match[1]). And the mbegin, mend are set locally, i.e. always start from "1".

--
Sebastian Gniazdowski
psprint /at/ zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author