in reply to Count Quoted Words
The regex might need to be adjusted depending on the exact definition of what should be counted as a quoted string within the input data.use File::Slurp; my $text = read_file('input.txt'); while ($text =~ /" (.*?) "/sg) { print "Found quoted string with ".split(' ', $1)." words: $1\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Count Quoted Words
by flash4syth (Initiate) on Jun 13, 2013 at 03:35 UTC |