in reply to Re: Re: counting regex hits Benchamark
in thread counting regex hits
$strg = qq[This has- some- d-a-she-s -in it]; %cnt = (); @chrs = split('',$strg); foreach (@chrs) { $cnt{$_}++; } print qq[$cnt{'-'}\n];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re*4: counting regex hits Benchamark
by Tomte (Priest) on Mar 19, 2003 at 09:17 UTC | |
by Doc Technical (Initiate) on Mar 19, 2003 at 20:05 UTC |