David --- Senior Programmer Analyst --- Wgo Wagner wrote: > Your log shows a space between the time and hyphen and hyphen and > Micro. You dont' have that in the regex and even more so, there is no > hyphen before Adapter log. > > You might want: > /^(\d\d-\d\d-\d{4})\s+(\d\d:\d\d:\d\d\.\d\d).+Adapter > log\s+(opened|closed)/i > > Anchor with the ^ and you will have date in $1, time in $2 and > opened or closed in $3. > A shot. > Wags ;)
you can avoid putting tons of \d in your reg by using: my($d,$t) = (split(/\s+/))[0,1]; print "$d,$t\n"; __END__ but a reg. expression should be much faster. david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]