Given a parser that returns a string,
search looks for all substrings in a string that
match that parser. For example, given a parser that matches
quoted strings, search will return an array of
all the quoted strings it finds in the input, as an array.
The rest of the input that isn't part of the result is
simply joined together and returned as a string. If you need a
more structured result + rest, you can use
within instead.
Given a parser that returns a string,
search
looks for all substrings in a string that match that parser. For example, given a parser that matches quoted strings,search
will return an array of all the quoted strings it finds in the input, as an array.The rest of the input that isn't part of the result is simply joined together and returned as a string. If you need a more structured result + rest, you can use
within
instead.