The regexpr package

[Tags: lgpl, library]

Regular expression library like Perl/Ruby's regular expressions. This package has a module RegexPR. And RegexPR export functions matchRegexPR and gsubRegexPR.

matchRegexPR :: String -> Maybe ((String, (String, String)), [(Int, String)])

gsubRegexPR :: 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", "")), [])]

Properties

Versions0.1.3, 0.1.5, 0.1.6, 0.1.7, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.5, 0.2.6, 0.2.8, 0.2.9, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4, 0.5, 0.5.1, 0.5.3, 0.5.4
Change logNone available
Dependenciesbase, HUnit, mtl
LicenseGPL
AuthorYoshikuni Jujo <PAF01143@nifty.ne.jp>
MaintainerPAF01143@nifty.ne.jp
Stabilityexperimental
CategoryText
Home pagehttp://homepage3.nifty.com/salamander/regexpr
UploadedTue Jan 22 12:18:07 UTC 2008 by YoshikuniJujo
DistributionsDebian:0.5.4, Fedora:0.5.4, LTSHaskell:0.5.4, NixOS:0.5.4, Stackage:0.5.4
Downloads4772 total (302 in last 30 days)
StatusDocs uploaded by user [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees