On Fri, Jul 02, 1999 at 09:15:28AM -0400, Bill Jones wrote: > # Thru process of elimination, we can see - > > while (<DATA>) { > #print $_ if /men/io; # This only matches 'embedded' men/women... What do you mean by 'embedded'? > #print $_ if /(^wo)men/io; # This only matches women... ...and only at the beginning of the string. > #print $_ if /[^wo]men/io; # This matches nothing... It matches 'men' following any character that is neither a 'w' nor an 'o'. > #print $_ if /men\b/io; # Same as first test... The first test matched 'men' anywhere, this one matches 'men' only if followed by a non-word character or the end of string. > print $_ if /\bmen\b/io; # This only matches embedded men... Again, what do you mean by 'embedded'? This matches 'men' if it is preceded by a non-word character or the beginning of string, and followed by a non-word character or the end of string. > } > Ronald ==== Want to unsubscribe from Fun With Perl? ==== Well, if you insist... Send mail with body "unsubscribe" to ==== fwp-request@technofile.org