Thanks to all who replied so promptly.

Duane's explanation captured it best for me.

> From: Duane Bronson
> Subject: Re: [Boston.pm] Perl regex question
> Date: Thu, Oct 25, 2012 at 06:31:01PM -0400
> 
> m// returns an array of ($1,$2,$3...), but your word (\w\S*) is always $1
> even though it's hit multiple times.  You're only getting the last hit.
> the /g is useless because of the ^ and $
> [...]

peace,          || Just the facts, ma'am:
--{kr.pA}       || http://www.washingtonpost.com/blogs/fact-checker/
-- 
Yoga: origami for people.

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to