The latest version of regexpr is 0.5.4-0.

regexpr

Version 0.2.9 revision 0 uploaded by YoshikuniJujo.

Package meta

Synopsis
regular expression like Perl/Ruby in Haskell
Description

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

Author
Yoshikuni Jujo <PAF01143@nifty.ne.jp>
Bug reports
n/a
Category
Text
Copyright
n/a
Homepage
http://homepage3.nifty.com/salamander/regexpr
Maintainer
PAF01143@nifty.ne.jp
Package URL
n/a
Stability
experimental

Components