I am new to the Elm parser library and I am trying to make a move away from using regex. I need to parse a string and return a list of strings for each string inside double curly braces like so {{return this}} I am using the Parser.sequence function and this is my code
block : Parser (List String)
block =
Parser.sequence
{ start = "{{"
, separator = ""
, end = "}}"
, spaces = spaces
, item = getSource
, trailing = Optional
}
My question is, What should I do in the item field to return the string in between the curly braces. Thanks!