Anonymous user
Count occurrences of a substring: Difference between revisions
m
→{{header|Tcl}}: fix blurb text
(→{{header|Tcl}}: Demonstrate the lack of re-metachar problems) |
m (→{{header|Tcl}}: fix blurb text) |
||
Line 28:
=={{header|Tcl}}==
The regular expression engine is ideal for
<lang tcl>proc countSubstrings {haystack needle} {
regexp -all ***=$needle $haystack
|