regexpr: regular expression like Perl/Ruby in Haskell

[ library, text ] [ Propose Tags ]

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)])

gmatchRegexPR :: String -> [((String, (String, String)), [(Int, String)])]

subRegexPR :: String -> String -> String

gsubRegexPR :: String -> String -> String

splitRegexPR :: String -> String -> [String]

Examples:

matchRegexPR "ab(cde)f\1" "kkkabcdefcdefgh" => Just (("abcdefcde", ("kkk", "fgh")),[(1,"cde")])

matchRegexPR "(?"kkkabchijabcde" = Just (("abc",("kkkabchij","de")),[])

gsubRegexPR "\G(\d\d\d)" "\1," "123456 789" => "123,456, 789"

subRegexPR "(?" \3\2\1 " "abcdefg" = "abcd dcb fg"

gsubRegexPR "(?ixm) aBc . # comment nn" "abc!" "abcnABCDAbcAbc" => "abc!abc!abc!bc"

gmatchRegexPR "(?=(?"abcdefdefabc" = [(("abc", ("", "defdefabc")), []), (("abc", ("defdef", "")), [])]

splitRegexPR "\s*,\s*" "a,b ,ct ,d , e" => ["a","b","c","d","e"]

Modules

[Last Documentation]

  • Text
    • Text.RegexPR

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.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
Dependencies base, HUnit, mtl, mtlparse [details]
License LicenseRef-GPL
Author Yoshikuni Jujo <PAF01143@nifty.ne.jp>
Maintainer PAF01143@nifty.ne.jp
Category Text
Home page http://homepage3.nifty.com/salamander/regexpr
Uploaded by YoshikuniJujo at 2008-01-24T22:58:53Z
Distributions Debian:0.5.4, Fedora:0.5.4
Reverse Dependencies 18 direct, 62 indirect [details]
Downloads 18589 total (93 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2017-01-03 [all 7 reports]