JanetDocsPlaygroundI'm feeling luckyGitHub sign in

peg/find-all



    cfunction

    (peg/find-all peg text &opt start & args)

    Find all indexes where the peg matches in text. Returns an array of 
    integers.


2 examplesSign in to add an example
Loading...
(peg/find-all ':d "Battery temperature: 40 °C")

# => @[21 22] indices containing digits

# :d (range "09")

# peg grammars are contained in a table @{} (mutable) located in boot.janet source file.

jgartePlayground
(peg/find-all ':d "hi 1 bye 2") # => @[3 9]
pepePlayground