MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | #ifndef LPC_REGEXP_H_ |
| 2 | #define LPC_REGEXP_H_ 1 |
| 3 | |
| 4 | /* Definitions of regexp option values */ |
| 5 | |
| 6 | /* Not really an RE option, but used in conjunction with some RE functions: */ |
| 7 | |
| 8 | #define RE_GLOBAL 0x0001 /* Apply RE globally (if possible) */ |
| 9 | |
| 10 | /* Options supported by the old regexp package: */ |
| 11 | |
| 12 | #define RE_EXCOMPATIBLE 0x0002 /* RE is compatible with ex */ |
| 13 | |
| 14 | /* Options supported by the PCRE regexp package: */ |
| 15 | |
| 16 | #define RE_CASELESS 0x0004 |
| 17 | #define RE_MULTILINE 0x0008 |
| 18 | #define RE_DOTALL 0x0010 |
| 19 | #define RE_EXTENDED 0x0020 |
| 20 | #define RE_ANCHORED 0x0040 |
| 21 | #define RE_DOLLAR_ENDONLY 0x0080 |
| 22 | #define RE_NOTBOL 0x0100 |
| 23 | #define RE_NOTEOL 0x0200 |
| 24 | #define RE_UNGREEDY 0x0400 |
| 25 | #define RE_NOTEMPTY 0x0800 |
| 26 | |
| 27 | /* Options specific for regmatch(): */ |
| 28 | |
| 29 | #define RE_MATCH_SUBS 0x1000 /* Return matched subexpressions */ |
| 30 | |
| 31 | /* Options specific for regexplode(): */ |
| 32 | |
| 33 | #define RE_OMIT_DELIM 0x1000 /* Omit the delimiters */ |
| 34 | |
| 35 | /* Regexp package selection options: */ |
| 36 | |
| 37 | #define RE_TRADITIONAL 0x04000000 |
| 38 | #define RE_PCRE 0x02000000 |
| 39 | |
| 40 | #define RE_PACKAGE_MASK (RE_TRADITIONAL | RE_PCRE) |
| 41 | |
| 42 | #endif /* LPC_REGEXP_H_ */ |