in reply to how to find substring using regex
UPDATE: OP has been edited without notice since this reply and the others to date. Original code (with code tags added by /me) was:
$cnt =0 $str="hi hi harshmane hi hi"; if ($str=~/([harsh]+)/g) # cf current content { $cnt++; } print $cnt;
OP has been msgd that such changes without notice are unhelpful.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to find substring using regex
by Argel (Prior) on Jun 23, 2011 at 16:16 UTC |