Re: [Haskell-cafe] Named captures in regex-pcre?

2012-01-28 Thread Roman Cheplyaka
* Ilya Portnov [2012-01-29 01:26:29+0500] > Hi haskell-cafe. > > Is there a way to get named captures from regex using regex-pcre (or > maybe other PCRE-package)? For example, I want to write something > like > > let result = "ab 12 cd" =~ "ab (?P\d+) cd" :: SomeCrypticType > > and then have na

Re: [Haskell-cafe] Named captures in regex-pcre?

2012-01-28 Thread Brandon Allbery
On Sat, Jan 28, 2012 at 15:26, Ilya Portnov wrote: > Is there a way to get named captures from regex using regex-pcre (or maybe > other PCRE-package)? For example, I want to write something like > regex-pcre is constrained by the common Haskell regex API (used by all the regex-* packages), which

[Haskell-cafe] Named captures in regex-pcre?

2012-01-28 Thread Ilya Portnov
Hi haskell-cafe. Is there a way to get named captures from regex using regex-pcre (or maybe other PCRE-package)? For example, I want to write something like let result = "ab 12 cd" =~ "ab (?P\d+) cd" :: SomeCrypticType and then have namedCaptures result == [("number", "12")]. I do not see so