rex.flags
Lua function

rex.flags

Summary

Returns a table of PCRE flags

Prototype

flag_table = rex.flags ()



Description

This returns a table of PCRE flags. You can index into this to get various compile and runtime flags.

The following are valid compile-time flags:


  • ANCHORED
  • CASELESS
  • DOLLAR_ENDONLY
  • DOTALL
  • EXTENDED
  • EXTRA
  • MULTILINE
  • NO_AUTO_CAPTURE
  • UNGREEDY
  • UTF8



The following are valid execution-time flags:


  • ANCHORED
  • NOTBOL
  • NOTEOL
  • NOTEMPTY


An example of using the flags would be:


re = rex.new ("(.+) goes (.+)", rex.flags ().CASELESS)


This would make a caseless regular expression.



See Also ...

Topics

DOC_lua_base Lua base functions
DOC_lua_bc Lua bc (big number) functions
DOC_lua_bit Lua bit manipulation functions
DOC_lua_coroutines Lua coroutine functions
DOC_lua_debug Lua debug functions
DOC_lua_io Lua io functions
DOC_lua_math Lua math functions
DOC_lua_os Lua os functions
DOC_lua_package Lua package functions
DOC_lua_rex Lua PCRE regular expression functions
DOC_lua Lua script extensions
DOC_lua_string Lua string functions
DOC_lua_tables Lua table functions
DOC_lua_utils Lua utilities
DOC_scripting Scripting

Lua functions

LUA_re:exec re:exec (Matches a regexp to a string, returning offsets)
LUA_re:gmatch re:gmatch (Matches a regexp to a string, applying a function)
LUA_re:match re:match (Matches a regexp to a string)
LUA_rex.new rex.new (Compiles a regular expression)

(Help topic: lua=rex.flags)

DOC_contents Documentation contents page