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 ;) -----Original Message----- From: Steve [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 08:12 To: [EMAIL PROTECTED] Subject: regular expression help.... I have the following line in a log file: 09-07-2002 11:39:25.95 - Microsoft Dial Up Adapter log opened. The date and time will always change but the after that it's always consistent (well opened will sometimes be closed) I need to get the entire date in a variable and the entire time in a variable. I will compare the difference between open and close and place THAT into a cumulative variable. Anyway this the rexexp I have to get the date and time but it's not matching: /(\d\d-\d\d-\d{4}) (\d\d:\d\d:\d\d\.\d\d)-(Adapter log)/ Now if I just do it like /(Adapter log)/ I get a match on Adapter log, which leads me to think that the problem is somewhere with my digit matching. Thanks ----- The three most dangerous things are a programmer with a soldering iron, a manager who codes, and a user who gets ideas. ---- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ********************************************************** 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]