in reply to Re^2: regex not working
in thread regex not working

Yes, that will do exactly as you've stated. This is where you can try it yourself in a simple test case:

while ( chomp($_ = <DATA>) ) { print /^((\d+)\-(\d+)\-(\d+)\s+(\d+):(\d+):(\d+))/ ? "Matched on '$_': $1\n" : "Unmatched on '$_'\n"; } __END__ 1990-01-01 00:00:00.000 1990-01-01 00:00:00.000 1991-08-06 12:21:12 1991-08-07 13:41:15.65 1992-09-2110:10:10.100