blob: 076532062295f740fc69d76f595799ba1b6d8eed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
definition module Regex
from StdMaybe import ::Maybe
from StdOverloaded import class toString, class fromString, class zero
:: Regex
:: Flag :== Int
:: Flags :== Int
class toRegex a :: !Flags !a -> Maybe Regex
class fromRegex a :: !Regex -> a
instance toRegex String
instance fromRegex String
instance zero Flags
instance toString Regex
instance fromString (Maybe Regex)
// Nothing if no match; otherwise Just i where i is the index of the match
match :: !Regex !String -> Maybe Int
// From pcre2.h
Regex_ALLOW_EMPTY_CLASS :== 0x00000001 /* C */
Regex_ALT_BSUX :== 0x00000002 /* C */
Regex_AUTO_CALLOUT :== 0x00000004 /* C */
Regex_CASELESS :== 0x00000008 /* C */
Regex_DOLLAR_ENDONLY :== 0x00000010 /* J M D */
Regex_DOTALL :== 0x00000020 /* C */
Regex_DUPNAMES :== 0x00000040 /* C */
Regex_EXTENDED :== 0x00000080 /* C */
Regex_FIRSTLINE :== 0x00000100 /* J M D */
Regex_MATCH_UNSET_BACKREF :== 0x00000200 /* C J M */
Regex_MULTILINE :== 0x00000400 /* C */
Regex_NEVER_UCP :== 0x00000800 /* C */
Regex_NEVER_UTF :== 0x00001000 /* C */
Regex_NO_AUTO_CAPTURE :== 0x00002000 /* C */
Regex_NO_AUTO_POSSESS :== 0x00004000 /* C */
Regex_NO_DOTSTAR_ANCHOR :== 0x00008000 /* C */
Regex_NO_START_OPTIMIZE :== 0x00010000 /* J M D */
Regex_UCP :== 0x00020000 /* C J M D */
Regex_UNGREEDY :== 0x00040000 /* C */
Regex_UTF :== 0x00080000 /* C J M D */
Regex_NEVER_BACKSLASH_C :== 0x00100000 /* C */
Regex_ALT_CIRCUMFLEX :== 0x00200000 /* J M D */
Regex_ALT_VERBNAMES :== 0x00400000 /* C */
Regex_USE_OFFSET_LIMIT :== 0x00800000 /* J M D */
|