Count occurrences of a substring: Difference between revisions
Content deleted Content added
→{{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
|