Charlotte Hee wrote:

On Fri, 30 Jul 2004, Bob Showalter wrote:

OK. Instead of using split, why not capture the tokens you're interested in. Something like:

for my $w ($title =~ /([A-Za-z]+[^A-Za-z\s]*)\s*/g) {

Let me see if I understand this expression:

[snip]

 \s*/g
This matches a blank space zero or more times and the 'g' means apply the
whole thing globally.

But why do I need the character classes in parentheses?

You don't really need parentheses, this should work as well:

for my $w ( $title =~ /[A-Za-z]+[^A-Za-z\s]*/g ) {



John
--
use Perl;
program
fulfillment

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to