diff options
author | Reuben Thomas <rrt@sc3d.org> | 2010-09-10 23:52:46 +0200 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2010-09-10 23:52:46 +0200 |
commit | c38ab1b1d82b39ed7deca7057f26f15f8641cbd3 (patch) | |
tree | dfccb6d57866459380ae78c5fcdc21d19f35e778 /doc | |
parent | e8cad1ece2a57492743a9b223a7b3aaa6727a254 (diff) | |
download | lrexlib-c38ab1b1d82b39ed7deca7057f26f15f8641cbd3.tar.gz |
Document the translation parameter for GNU regexs.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual.txt | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/doc/manual.txt b/doc/manual.txt index 309fa7c..d7ac251 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -622,14 +622,19 @@ GNU-only functions and methods new --- -:funcdef:`rex.new (patt, [cf], [tr], [syn])` - -The *syntax* parameter (*syn*) must be one of the predefined strings that are formed -from the RE_SYNTAX_xxx identifiers defined in regex.h, by means of omitting the -RE_SYNTAX\_ part. For example, RE_SYNTAX_GREP becomes ``"GREP"`` on the Lua -side. The default value, used when the parameter is not supplied or ``nil``, is -either ``"POSIX_EXTENDED"`` (at start-up), or the value set by the last -setsyntax_ call. +:funcdef:`rex.new (patt, [cf], [syn], [tr])` + +The *syntax* parameter (*syn*) must be one of the predefined strings that are +formed from the RE_SYNTAX_xxx identifiers defined in regex.h, by means of +omitting the RE_SYNTAX\_ part. For example, RE_SYNTAX_GREP becomes ``"GREP"`` on +the Lua side. The default value, used when the parameter is not supplied or +``nil``, is either ``"POSIX_EXTENDED"`` (at start-up), or the value set by the +last setsyntax_ call. + +The *translation* parameter (*tr*) is a map of eight-bit character codes (0 to +255 inclusive) to 8-bit characters (strings). If this parameter is given, the +pattern is translated at compilation time, and each string to be matched is +translated when it is being matched. setsyntax --------- |