hi list, I need help for this script, i think it's more of my regex construct error;
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; while(<DATA>) { if(/CDiscoverySource.*<WKSMDE[0-9]+>/is) { print $_; } } __DATA__ rocessing <System> #7... $$<SMS_DISCOVERY_DATA_MANAGER><Fri Jul 14 13:22:00.961 2006 Malay Peninsula Standard Time><thread=3480 (0xD98)> CDiscoverySource::VerifyClientPublicKeys - Public key does not exist for client GUID:4EFB420C-07F6-4E47-9472-AC20C0AF613B. $$<SMS_DISCOVERY_DATA_MANAGER><Fri Jul 14 13:22:00.977 2006 Malay Peninsula Standard Time><thread=3480 (0xD98)> ==>Name = <WKSMDE05612> $$<SMS_DISCOVERY_DATA_MANAGER><Fri Jul 14 13:22:00.977 2006 Malay Peninsula Standard Time><thread=3480 (0xD98)> Info: The DDR contains 21 properties, but none has new values $$<SMS_DISCOVERY_DATA_MANAGER><Fri Jul 14 13:22:00.977 2006 Malay Peninsula Standard Time><thread=3480 (0xD98)> insert agent information: DiscItemAgents : execute sql IF EXISTS (select ItemKey from DiscItemAgents where ItemKey = 7 and DiscArchKey = 5 and AgentID = 7 and AgentSite = "MDE") update DiscItemAgents set AgentTime = "07/14/2006 13:21:24" where ItemKey = 7 and DiscArchKey = 5 and AgentID = 7 and AgentSite = "MDE"~ ELSE insert into DiscItemAgents (AgentTime, ItemKey, DiscArchKey, AgentID, AgentSite) values ("07/14/2006 13:21:24", 7, 5, 7, "MDE")~ $$<SMS_DISCOVERY_DATA_MANAGER><Fri Jul 14 13:22:00.977 2006 Malay Peninsula Standard Time><thread=3480 (0xD98)> IF i add: 1:) $/ = ""; # it will spit out the same text as my DATA, 2:) \b #no output same with above. I tried to run my regex on regexcoach with same Data i have it highlighted the portion that i want. # CDiscoverySource::VerifyClientPublicKeys - Public key does not exist for client GUID:4EFB420C-07F6-4E47-9472-AC20C0AF613B. $$<SMS_DISCOVERY_DATA_MANAGER><Fri Jul 14 13:22:00.977 2006 Malay Peninsula Standard Time><thread=3480 (0xD98)> ==>Name = <WKSMDE05612> TIA for any pointers and tips. /joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>