@hackage regexpr0.2.2
regular expression like Perl/Ruby in Haskell
Categories
License
LicenseRef-GPL
Maintainer
PAF01143@nifty.ne.jp
Links
- Documentation
- No source repository
- Security
Versions
Installation
Dependencies (3)
Dependents (28)
@hackage/hledger, @hackage/air-extra, @hackage/Bitly, @hackage/synt, @hackage/bizzlelude-js, @hackage/yavie, Show all…
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 "(?"kkkabchijabcde" = Just (("abc",("kkkabchij","de")),[])
gsubRegexPR "\G(\d\d\d)" "\1," "123456 789" => "123,456, 789"