Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 837CFF853 for ; Sun, 14 Apr 2013 14:19:49 +0000 (UTC) Received: (qmail 11547 invoked by uid 500); 14 Apr 2013 14:19:48 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 11497 invoked by uid 500); 14 Apr 2013 14:19:47 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 11488 invoked by uid 99); 14 Apr 2013 14:19:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Apr 2013 14:19:47 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [194.242.35.75] (HELO dns-factory.at) (194.242.35.75) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Apr 2013 14:19:41 +0000 Received: from [172.17.100.8] apache@gknw.net [62.143.120.100] by dns-factory.at with NetMail SMTP Agent $Revision: 8582 $ on Novell NetWare via secured & encrypted transport (TLS); Sun, 14 Apr 2013 16:19:10 +0200 Message-ID: <516ABADD.4020602@apache.org> Date: Sun, 14 Apr 2013 16:19:09 +0200 From: Guenter Knauf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r1467730 - /httpd/httpd/trunk/docs/manual/mod/mod_lua.xml References: <20130414064723.3E68823888CD@eris.apache.org> In-Reply-To: <20130414064723.3E68823888CD@eris.apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Daniel, On 14.04.2013 08:47, humbedooh@apache.org wrote: > Author: humbedooh > Date: Sun Apr 14 06:47:22 2013 > New Revision: 1467730 > > URL: http://svn.apache.org/r1467730 > Log: > fix regex documentation for mod_lua > > Modified: > httpd/httpd/trunk/docs/manual/mod/mod_lua.xml > > Modified: httpd/httpd/trunk/docs/manual/mod/mod_lua.xml > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod= _lua.xml?rev=3D1467730&r1=3D1467729&r2=3D1467730&view=3Ddiff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- httpd/httpd/trunk/docs/manual/mod/mod_lua.xml (original) > +++ httpd/httpd/trunk/docs/manual/mod/mod_lua.xml Sun Apr 14 06:47:22 2= 013 > @@ -864,12 +864,19 @@ end > > > > -r:regex(string, pattern) -- Runs a regular expression match on a strin= g, returning captures if matched: > +r:regex(string, pattern, [flags]) -- Runs a regular expression match o= n a string, returning captures if matched: > > -local matches =3D r:regex("foo bar baz", "foo (\w+) (\S*)") > +local matches =3D r:regex("foo bar baz", [[foo (\w+) (\S*)]]) > if matches then > r:puts("The regex matched, and the last word captured ($2) was: "= =2E. matches[2]) > end > + > +-- Example ignoring case sensitivity: > +local matches =3D r:regex("FOO bar BAz", [[(foo) bar]], 1) > + > +-- Flags can be a bitwise combination of: > +-- 0x01: Ignore case > +-- 0x02: Multiline search > > > thanks very much for showing this very cool auto escaping trick! I wasnt aware of it, and this makes a regex a lot more readable! G=C3=BCn.