From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11850 invoked from network); 28 Apr 2007 08:21:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.8 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Apr 2007 08:21:06 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 12501 invoked from network); 28 Apr 2007 08:21:00 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Apr 2007 08:21:00 -0000 Received: (qmail 10832 invoked by alias); 28 Apr 2007 08:20:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23341 Received: (qmail 10822 invoked from network); 28 Apr 2007 08:20:57 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Apr 2007 08:20:57 -0000 Received: (qmail 12293 invoked from network); 28 Apr 2007 08:20:57 -0000 Received: from redoubt.spodhuis.org (HELO mx.spodhuis.org) (193.202.115.177) by a.mx.sunsite.dk with SMTP; 28 Apr 2007 08:20:53 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=first1; d=spodhuis.org; h=Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=Bl5jP9zoIV3V1+sbRUsnORYNyHtp5UzultEAizHWaCxagsOTzxnjZg6H9vJ3TAPvPBdts3r8I8N1mNakNgvT7g+yQu9W2u9FGo+qnDfoxkchEqEA2AdJvtXRdRlCBunx0Ftb1ugvT0xCJH/8Wvj37RTOhwlpOcsuQ16qFhOWaf4=; Received: by smtp.spodhuis.org with local id 1HhiAm-000DYk-VE; Sat, 28 Apr 2007 08:20:52 +0000 Date: Sat, 28 Apr 2007 01:20:52 -0700 From: Phil Pennock To: zsh-workers@sunsite.dk Subject: Re: PATCH: zsh/regex and =~ Message-ID: <20070428082052.GA42992@redoubt.spodhuis.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <20070428075635.GA17419@redoubt.spodhuis.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <20070428075635.GA17419@redoubt.spodhuis.org> --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2007-04-28 at 00:56 -0700, Phil Pennock wrote: > The attached patch and files, which includes documentation, *sigh* I say these things, I tinker with documentation for the options etc, but do I remember to write documentation for the new module? See attached, relative to the source tree as patched by the previous mail. --wac7ysb48OaltWcw Content-Type: text/x-diff; charset=us-ascii Content-Disposition: inline; filename="zsh-regex-doc.patch" diff -pNur zsh-regexp/Doc/Makefile.in zsh-regex-doc/Doc/Makefile.in --- zsh-regexp/Doc/Makefile.in Sun Dec 17 08:02:02 2006 +++ zsh-regex-doc/Doc/Makefile.in Sat Apr 28 01:08:36 2007 @@ -61,7 +61,7 @@ Zsh/mod_computil.yo \ Zsh/mod_datetime.yo Zsh/mod_deltochar.yo \ Zsh/mod_example.yo Zsh/mod_files.yo \ Zsh/mod_mapfile.yo Zsh/mod_mathfunc.yo Zsh/mod_newuser.yo \ -Zsh/mod_parameter.yo Zsh/mod_pcre.yo \ +Zsh/mod_parameter.yo Zsh/mod_pcre.yo Zsh/mod_regex.yo \ Zsh/mod_sched.yo Zsh/mod_socket.yo \ Zsh/mod_stat.yo Zsh/mod_system.yo Zsh/mod_tcp.yo \ Zsh/mod_termcap.yo Zsh/mod_terminfo.yo \ diff -pNur zsh-regexp/Doc/Zsh/mod_regex.yo zsh-regex-doc/Doc/Zsh/mod_regex.yo --- zsh-regexp/Doc/Zsh/mod_regex.yo Wed Dec 31 16:00:00 1969 +++ zsh-regex-doc/Doc/Zsh/mod_regex.yo Sat Apr 28 01:15:20 2007 @@ -0,0 +1,24 @@ +COMMENT(!MOD!zsh/regex +Interface to the POSIX regex library. +!MOD!) +cindex(regular expressions, REGEX) +The tt(zsh/regex) module makes available the following test condition: +startitem() +findex(regex-match) +item(expr tt(-regex-match) regex)( +Matches a string against a POSIX extended regular expression. +The matched portion of the string will normally be placed in the tt($MATCH) +variable. If there are any capturing parentheses within the regex, then +the tt($match) array variable will contain those. + +For example, + +[[ alphabetical -regex-match ^a([^a]+)a([^a]+)a ]] && print -l $MATCH X $match + +If tt(REGMATCH_PCRE) is not set, then the tt(=~) operator will automatically +load this module as needed and will invoke the tt(-regex-match) operator. + +If tt(BASH_REMATCH) is set, then tt($BASH_REMATCH) will be set instead of +tt($MATCH) and tt($match). +) +enditem() --wac7ysb48OaltWcw--