Split and substitution using regex-pcre

I could not find the perl-equivalents of these functions on Hackage, so I quickly wrote mine. Code is there: https://github.com/bartavelle/pcre-utils It should behave like perl (not really tested actually), and do strange things like :
splitCompile "a" "aaaab" Right ["","","","","b"] splitCompile "a" "aaaabaaa" Right ["","","","","b"]
This will go on Hackage as I need it for the language-puppet package, but I am interested in comments, especially concerning the namespaces: * is the name of this package OK ? * is the name of the package OK ? * should I work with the regex-pcre maintainer to try to merge it ?

You cannot bend the split package to your needs?
http://hackage.haskell.org/packages/archive/split/0.2.1.2/doc/html/Data-List...
Some combination of splitWhen and a pcre-based predicate?
On 24 February 2013 22:44, Simon Marechal
I could not find the perl-equivalents of these functions on Hackage, so I quickly wrote mine. Code is there:
https://github.com/bartavelle/pcre-utils
It should behave like perl (not really tested actually), and do strange things like :
splitCompile "a" "aaaab" Right ["","","","","b"] splitCompile "a" "aaaabaaa" Right ["","","","","b"]
This will go on Hackage as I need it for the language-puppet package, but I am interested in comments, especially concerning the namespaces: * is the name of this package OK ? * is the name of the package OK ? * should I work with the regex-pcre maintainer to try to merge it ?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, Mar 01, 2013 at 08:30:20AM +1300, Alistair Bayley wrote:
You cannot bend the split package to your needs? http://hackage.haskell.org/packages/archive/split/0.2.1.2/doc/html/Data-List...
Some combination of splitWhen and a pcre-based predicate?
This won't work; splitWhen operates only on single list elements, not on substrings. -Brent
On 24 February 2013 22:44, Simon Marechal
wrote: I could not find the perl-equivalents of these functions on Hackage, so I quickly wrote mine. Code is there:
https://github.com/bartavelle/pcre-utils
It should behave like perl (not really tested actually), and do strange things like :
splitCompile "a" "aaaab" Right ["","","","","b"] splitCompile "a" "aaaabaaa" Right ["","","","","b"]
This will go on Hackage as I need it for the language-puppet package, but I am interested in comments, especially concerning the namespaces: * is the name of this package OK ? * is the name of the package OK ? * should I work with the regex-pcre maintainer to try to merge it ?
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Alistair Bayley
-
Brent Yorgey
-
Simon Marechal