Safe Haskell | None |
---|---|
Language | Haskell2010 |
although sometimes funs in Ascii modules work with non-ascii text (as some examples show), for reliable results with Utf8 pattern or body, use Text.Regex.Do.Pcre.Utf8.Match
see also Text.Regex.Base.RegexLike and Text.Regex.Do.Pcre.Ascii.MatchHint
Documentation
class Match a b out where Source
- a:
String
,ByteString
,Regex
- b:
String
,ByteString
- out: [
String
], [[String
]], [ByteString
], [[ByteString
]],Bool
, [PosLen
], [[PosLen
]]
match
covers all result types
compiler looks up the appropriate function depending on the result type
=~
is borrowed from Text.Regex.PCRE.Wrap,
is a short version of match
precompiled Regex may be used as pattern too. see Text.Regex.Do.Pcre.Utf8.Match
See also Text.Regex.Do.Pcre.Ascii.MatchHint
Rx_ a b => Match a b Bool Source | test
True |
Rx_ a b => Match a b [[PosLen]] Source | match all |
Rx_ a b => Match a b [PosLen] Source | match once
[(8,2)] |
Rx_ a b => Match a b [[b]] Source | match all
[["well"],["well"]] |
Rx_ a b => Match a b [b] Source | match once
["all"] |
extract :: Extract source => (Int, Int) -> source -> source
extract takes an offset and length and has a default
implementation of extract (off,len) source = before len (after
off source)
extract
is reexport from Text.Regex.Base.RegexLike