Regex
A compiled regular expression.
A compiled regular expression.
regex-applicative is a Haskell library for parsing using regular expressions. Parsers can be built using Applicative interface.
Version 0.2
Interface API for regex-posix,pcre,parsec,tdfa,dfa
Version 0.93.2
One module layer over regex-posix to replace Text.Regex
Version 0.95.1
The lazy DFA engine, based on CTKLight, for regex-base
Version 0.91
From a regex, generate all possible strings it can match
Version 0.3.2
A better performance, lazy, powerful replacement of Text.Regex and JRegex
Version 0.90
The PCRE backend to accompany regex-base, see www.pcre.org
Version 0.94.4
The PCRE backend to accompany regex-base, see www.pcre.org
Version 0.94.2.1.7.7
Regex algorithm implementation using partial derivatives
Version 0.1.1
The posix regex backend for regex-base
Version 0.95.2
Most platforms have a buggy system regex library and this probes the bugs by using the regex-posix package, run with "regex-posix-unittest"
Version 1.1
A new all Haskell "tagged" DFA regex engine, inspired by libtre
Version 1.1.8
Apply regex-posix-unittest tests to regex-tdfa
Version 1.1
This combines regex-tdfa with utf8-string to allow searching over UTF8 encoded lazy bytestrings.
Version 1.0
The TRE backend to accompany regex-base
Version 0.91
This library supports full W3C XML Schema regular expressions inclusive all Unicode character sets and blocks. The complete grammar can be found under http://www.w3.org/TR/xmlschema11-2/#regexs. It is implemented by the technique of derivations of regular expressions. The W3C syntax is extended to support not only union of regular sets, but also intersection, set difference, exor. Matching of subexpressions is also supported. The library can be used for constricting lightweight scanners and tokenizers. It is a standalone library, no external regex libraries are used.
Version 0.1.5
Provides a POSIX, extended regex-engine, specialised from the underlying polymorphic package regexdot, to merely process the traditional character-lists.
Version 0.9.0.9
RegexContext is the polymorphic interface to do matching. Since target is polymorphic you may need to suply the type explicitly in contexts
The monadic matchM version uses fail to report when the regex has no match in source. Two examples:
Here the contest Bool is inferred:
> [ c | let notVowel = makeRegex "[^aeiou]" :: Regex, c <- ['a'..'z'], match notVowel [c] ]
>
> "bcdfghjklmnpqrstvwxyz"
Here the context '[String]' must be supplied:
> let notVowel = (makeRegex "[^aeiou]" :: Regex )
> in do { c <- ['a'..'z'] ; matchM notVowel [c] } :: [String]
>
> ["b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"]
Provides a portable, POSIX, extended regex-engine, designed to process a list of arbitrary objects.
Version 0.11.0.1
Matches a regular expression against a string
Matches a regular expression against a string
RegexLike is parametrized on a regular expression type and a source type to run the matching on.
There are default implementations: matchTest and matchOnceText use matchOnce; matchCount and matchAllText use matchAll. matchOnce uses matchOnceText and matchAll uses matchAllText. So a minimal complete instance need to provide at least (matchOnce or matchOnceText) and (matchAll or matchAllText). Additional definitions are often provided
> [ c | let notVowel = makeRegex "[^aeiou]" :: Regex, c <- ['a'..'z'], matchTest notVowel [c] ]
>
> "bcdfghjklmnpqrstvwxyz"
The strictness of these functions is instance dependent.
Rather than carry them around spearately, the options for how to execute a regex are kept as part of the regex. There are two types of options. Those that can only be specified at compilation time and never changed are CompOpt. Those that can be changed later and affect how matching is performed are ExecOpt. The actually types for these depend on the backend.
Regular Expressions on Tries.
Version 0.2
Regular expression library like Perl and Ruby's regular expressions. This package has a module RegexPR. And RegexPR export functions matchRegexPR and gsubRegexPR.
> matchRegexPR :: String -> String -> Maybe ((String,
> (String, String)), [(Int, String)])
> multiMatchRegexPR :: String -> String -> [ ((String, (String,
> String)), [(Int, String)]) ]
> gmatchRegexPR :: String -> String -> [ ((String, (String,
> String)), [(Int, String)]) ]
> getbrsRegexPR :: String -> String -> [ String ]
> ggetbrsRegexPR :: String -> String -> [ [ String ] ]
> subRegexPR :: String -> String -> String -> String
> subRegexPRBy :: String -> (String -> String) ->
> String -> String
> gsubRegexPR :: String -> String -> String -> String
> gsubRegexPRBy :: String -> (String -> String) ->
> String -> String
> splitRegexPR :: String -> String -> [String]
Examples
> matchRegexPR "ab(cde)f\\1" "kkkabcdefcdefgh" =>
> Just (("abcdefcde", ("kkk",
> "fgh")),[(1,"cde")])
> matchRegexPR "(?<=hij)abc" "kkkabchijabcde" =>
> Just (("abc",("kkkabchij","de")),[])
> gsubRegexPR "\\G(\\d\\d\\d)" "\\1," "123456
> 789" => "123,456, 789"
> subRegexPR "(?<=(.)(.)(.))e" " \\3\\2\\1 "
> "abcdefg" => "abcd dcb fg"
> gsubRegexPR "(?ixm) aBc . # comment \n\n" "abc!"
> "abc\nABCDAbcAbc" =>
> "abc!abc!abc!bc"
> gmatchRegexPR "(?=(?<!(?!abc)))abc" "abcdefdefabc" =>
> [(("abc", ("", "defdefabc")),
> []), (("abc", ("defdef", "")), [])]
> splitRegexPR "\\s*,\\s*" "a,b ,c\t ,d , e"
> => ["a","b","c","d","e"]
Version 0.5.4
Equality, containment, intersection among regular expressions via symbolic manipulation
Version 0.5
Regular expression matching. Uses the POSIX regular expression interface in Text.Regex.Posix.
Classes and instances for Regex matching.
All the classes are declared here, and some common type aliases, and the MatchResult data type.
The only instances here are for Extract String and Extract ByteString. There are no data values. The RegexContext instances are in Text.Regex.Base.Context, except for ones which run afoul of a repeated variable (RegexContext regex a a), which are defined in each modules' String and ByteString modules.
This library supports full W3C XML Schema regular expressions inclusive all Unicode character sets and blocks. The complete grammar can be found under http://www.w3.org/TR/xmlschema11-2/#regexs. It is implemented by the technique of derivations of regular expressions. The W3C syntax is extended to support not only union of regular sets, but also intersection, set difference, exor. Matching of subexpressions is also supported. The library can be used for constricting lightweight scanners and tokenizers. It is a standalone library, no external regex libraries are used. This package is a substitute for the old regex-xmlschema package.
Version 9.0.4
Show more results