radhika wrote: > Hi, > I need to parse this string: 2005-03-11 13:49:41.19 > to just get the hour and minute. > > my program has: > > if( $string = /([\d]+)-([\d]+)-([\d]+)\s([\d\d):(\d\d):(\w+)/ ) > { > print("Hour:Minute = $4:$5\n"); > } I doubt that you are running under strict and warnings. You need to be and you would get your warnings and then some insight. So you don't need the charaacter classes and you need the tilda to go with = so : $string =~ /(\d+)-(\d+)-(\d+)\s(\d\d):(\d\d):(\w+)/
Now it will print out. Wags ;) > > This is breaking. If anyone can refine this, that would be great. > thanks, > radhika > > > > > -- > It's all a matter of perspective. You can choose your view by choosing > where to stand. > Larry Wall > --- ******************************************************* This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ******************************************************* -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>