diff options
author | Daniel Gruno <humbedooh@apache.org> | 2013-04-14 08:48:20 +0200 |
---|---|---|
committer | Daniel Gruno <humbedooh@apache.org> | 2013-04-14 08:48:20 +0200 |
commit | 3a0847f3e81b11bcb70fc91773a7bd87bfda58cd (patch) | |
tree | d78aabec0aca0ae55c215aea66b5149e38084962 /docs/manual/mod/mod_lua.html.en | |
parent | fix regex documentation for mod_lua (diff) | |
download | apache2-3a0847f3e81b11bcb70fc91773a7bd87bfda58cd.tar.xz apache2-3a0847f3e81b11bcb70fc91773a7bd87bfda58cd.zip |
xforms
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1467731 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_lua.html.en')
-rw-r--r-- | docs/manual/mod/mod_lua.html.en | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/manual/mod/mod_lua.html.en b/docs/manual/mod/mod_lua.html.en index 0e5ac594be..921589749b 100644 --- a/docs/manual/mod/mod_lua.html.en +++ b/docs/manual/mod/mod_lua.html.en @@ -939,12 +939,19 @@ end <pre class="prettyprint lang-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 </pre> |