Vocabularypeg.
searchInputsstring | a string |
parser | a peg based parser |
OutputsWord descriptionReturns a sequence containing the parse results of all substrings from the input string that successfully parse using the parser.
USING: peg.parsers peg.search prettyprint ;
"one 123 two 456" integer-parser peg-search .
V{ 123 456 }
USING: peg peg.parsers peg.search prettyprint ;
"one 123 \"hello\" two 456" integer-parser string-parser 2choice peg-search .
V{ 123 "hello" 456 }
See alsopeg-replaceDefinition