[Haskell-cafe] Attoparsec: match many, skipping rest

amindfv at gmail.com amindfv at gmail.com
Sat Apr 11 20:23:52 UTC 2020

Say I've got an Attoparsec parser like:

    p = string "prio:" *> digit

And some text, e.g.

    s = "this is just a prio:5 example, I'd prio:6 very much like to prio:4 parse"

What's the most idiomatic way to apply p to s so that I get out a list ['5', '6', '4']?


More information about the Haskell-Cafe mailing list