On 20 Aug 2003, Wade wrote:
> if ($text =~ /gecos: (.*?)/i) {
The ? makes the regexp non-greedy so it matches the minimum number of
times possible... maybe it's matching null for some reason. get rid of
the question mark and it works, although i don't totally understand how
the greediness works. in this instance, i would probably use a word
boundary:
if ($text =~ /gecos: (\w+)/i) {
ray
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ray DeJean http://www.r-a-y.org
Systems Engineer Southeastern Louisiana University
IBM Certified Specialist AIX Administration, AIX Support
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=