Handbook
Glossary
count-patterns ( string -- )
Vocabulary
benchmark
.
regex-dna
Inputs
string
an
object
Outputs
None
Definition
USING:
accessors
io
kernel
math.parser
regexp
sequences
;
IN:
benchmark.regex-dna
:
count-patterns
( string -- )
{
R/ agggtaaa|tttaccct/i
R/ [cgt]gggtaaa|tttaccc[acg]/i
R/ a[act]ggtaaa|tttacc[agt]t/i
R/ ag[act]gtaaa|tttac[agt]ct/i
R/ agg[act]taaa|ttta[agt]cct/i
R/ aggg[acg]aaa|ttt[cgt]ccct/i
R/ agggt[cgt]aa|tt[acg]accct/i
R/ agggta[cgt]a|t[acg]taccct/i
R/ agggtaa[cgt]|[acg]ttaccct/i
}
[
[
raw>>
write
bl
]
[
count-matches
number>string
print
]
bi
]
with
each
;