In the first case you need to have some form of variable for each function-name to keep the tally (an array or --even better-- a hash will do the trick).
In the other case, you can build one big regex (all functions names joined together with | (which is "or" in a regex) and feed your source to that regex.
Warning: there can be many subtle traps and pitfalls:
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Text comparisons
by CountZero
in thread Text comparisons
by ScarryJerry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |