[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [FWP] Gender differentiation



Word-boundary metacharacter won't work for you?

$_ = "Men are from Mars, women are from Venus, real men don't eat quiche.";
@list = /\bmen\b/ig;

Steve Willer wrote:
 
> This post isn't nearly as interesting as the subject implies.
> 
> I've been trying to come up with a way to match "men" in any 
> string, but
> not get a false match from "women".
> 
> I would very much like to use something like:
> 
>   /(^|[^o])men/i
> 
> ...but that doesn't work. Is there anything that does work, fun or
> otherwise?

==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org