
10 Dec
2019
10 Dec
'19
10:28 a.m.
On Tue, Dec 10, 2019 at 09:47:41AM +0000, PICCA Frederic-Emmanuel wrote:
I have a bunch of files names like this <prefix>_data_00006.cbf
[...]
I am using attoparsec, I started to write my parser like this
parseCbfDataFile :: String -> Parser CbfDataFile parseCbfDataFile s = do prefix <- ???? string "_data_" v <- decimal string ".cbf" return (CbfDataFile prefix v)
So my question, is how to I write this parser.
`manyTill` [1] should do [1] https://hackage.haskell.org/package/attoparsec-0.13.2.2/docs/Data-Attoparsec...