httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1467730 - /httpd/httpd/trunk/docs/manual/mod/mod_lua.xml
Date Sun, 14 Apr 2013 06:47:23 GMT
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=1467730&r1=1467729&r2=1467730&view=diff
==============================================================================
--- 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 2013
@@ -864,12 +864,19 @@ end
 </highlight>
 
 <highlight language="lua">
-r:regex(string, pattern) -- Runs a regular expression match on a string, returning captures
if matched:
+r:regex(string, pattern, [flags]) -- Runs a regular expression match on a string, returning
captures if matched:
 
-local matches = r:regex("foo bar baz", "foo (\w+) (\S*)")
+local matches = r:regex("foo bar baz", [[foo (\w+) (\S*)]])
 if matches then
     r:puts("The regex matched, and the last word captured ($2) was: " .. matches[2])
 end
+
+-- Example ignoring case sensitivity:
+local matches = r:regex("FOO bar BAz", [[(foo) bar]], 1)
+
+-- Flags can be a bitwise combination of:
+-- 0x01: Ignore case
+-- 0x02: Multiline search
 </highlight>
 
 <highlight language="lua">



Mime
View raw message