Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
while($input =~ m/(\w+)/g) { if( $input =~ m/[\w\s]/g) { $count++; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Counting in regular expressions
by pc88mxer (Vicar) on Mar 16, 2008 at 16:06 UTC | |
|
Re: Counting in regular expressions
by McDarren (Abbot) on Mar 16, 2008 at 16:18 UTC | |
|
Re: Counting in regular expressions
by wade (Pilgrim) on Mar 16, 2008 at 16:14 UTC | |
|
Re: Counting in regular expressions
by Anonymous Monk on Mar 16, 2008 at 16:44 UTC |