[Haskell-cafe] Parsec: non-greedy 'between'
Alexander Solla
alex.solla at gmail.com
Sun Sep 11 22:45:58 CEST 2011
On Sun, Sep 11, 2011 at 1:38 PM, Scott Lawrence <bytbox at gmail.com> wrote:
> Hey all,
>
> Trying to match C-style comments, I have:
>
> between (string "/*") (string "*/") $ many anyChar
>
> Which doesn't work, because it is equivalent (ignoring returned values) to
>
> do {string "/*"; many anyChar; string "*/"}
>
>
Use "manyTill".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110911/580f4137/attachment.htm>
More information about the Haskell-Cafe
mailing list