Peter Eisengrein [mailto:[EMAIL PROTECTED]] wrote:
> I have a script that reads through a log file and does stuff when > certain lines are matched. Some of the lines start with a * and the > following regex's used to work: > if(/\*C(\d+)\:(\d+)\:(\d+)\s+\d+\,\d+(.*COMPL)/){ #do stuff > }elsif(/\*\*(\d+)\:(\d+)\:(\d+)\s+\d+\,\d+(.*COMPL)/){ #do stuff > }elsif(/\*\s+(\d+)\:(\d+)\:(\d+)\s+\d+\,\d+(.*COMPL)/){ #do stuff } > > until another elsif (below) was added and now *ONLY* this one will match! > > elsif(/I\s+(\d+)\:(\d+)\:(\d+)\s+\d+\,\d+(.*COMPL)/){ #do stuff } Would really need to see some lines of the log file to know. You are not anchoring the regex so it does not require that the match start at the beginning of the line. If the first pattern was matching your input, and you have added the new regex at the end (ie as another elsif clause) it will not stop the first pattern from matching. Assuming it is not a typo problem, I suggest post the entire regex snippet and a short chunk of the log file. cheers, bj -- Brad Warkentin CAD Manager Email: [EMAIL PROTECTED] AcceLight Networks Phone: 613.596.4804 x4388 26 Auriga Drive, ON Fax: 613.596.2399 K2E 8B7 _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs