[Haskell-cafe] Non-greedy match in Text.Regx.Posix

C K Kashyap ckkashyap at gmail.com
Tue Jul 17 15:54:15 CEST 2012


Thanks Roman,

I guess I better invest my time in Parsec then :)

Regards,
Kashyap

On Tue, Jul 17, 2012 at 5:05 PM, Roman Cheplyaka <roma at ro-che.info> wrote:

> * C K Kashyap <ckkashyap at gmail.com> [2012-07-17 13:31:05+0530]
> > I was exploring Text.Regex.Posix and found that I was not able to do a
> > non-greedy match by modifying the quantifier with a "?". How can I
> achieve
> > non-greedy match in Text.Regex.Posix?
>
> POSIX regular expressions semantics doesn't have a notion of a
> greedy/non-greedy match.
> Use an engine that implements Perl semantics if you need one.
>
> Refer to [1] for more detail.
>
> [1]:
> http://www.haskell.org/haskellwiki/Regular_expressions#.28apple.7Corange.29
>
> --
> Roman I. Cheplyaka :: http://ro-che.info/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120717/326f1817/attachment.htm>


More information about the Haskell-Cafe mailing list