Hi, I am sorry, I didn't realise that colors won't be visible. I have to check the combination of "FastEthernet3/9" becomes "administratively down"
An excerpt of my output buffer looks like this. *************************************************************** ifEntry.1.13 = 13 ifEntry.2.13 = FastEthernet3/9 ifEntry.3.13 = 6 lifEntry.20.13 = administratively down Jul 5 03:22:33.851 cst: SNMP: Queuing packet to 10.3.0.1 Jul 5 03:22:33.851 cst: SNMP: V1 Trap, ent products.310, addr 10.20.0.1, gentrap 2,spectrap 0 ifEntry.1.13 = 13 ifEntry.2.13 = FastEthernet3/9 ifEntry.3.13 = 6 lifEntry.20.13 = administratively down Jul 5 03:22:34.079 cst: %SYS-5-CONFIG_I: Configured from console by vty2 (10.3.0.9) **************************************************************** All the scalars (i.e. lines) in the array of scalars (the excerpt of the buffer) end with a NEW LINE character. I have to write a regex ( a one liner because I want to give a regex in one of my testcase input file) such that it matches patterns spreading across many lines and then print those lines. Like ************************* MATCHED : ifEntry.2.13 = FastEthernet3/9 lifEntry.20.13 = administratively down ***************************** Thanks Rajeev -----Original Message----- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Saturday, July 05, 2003 8:21 PM To: [EMAIL PROTECTED] Subject: Re: Regular expression problem. Pandey Rajeev-A19514 wrote: > Hi, > > Can anyone give me a regular expression(perhaps a one liner) ? > Matching an expression in a single line is easy. But if I have to find it out in a > array of scalars, it becomes tricky for me. > > An excerpt of my output buffer looks like this. > *************************************************************** > ifEntry.1.13 = 13 > ifEntry.2.13 = FastEthernet3/9 > ifEntry.3.13 = 6 > lifEntry.20.13 = administratively down > Jul 5 03:22:33.851 cst: SNMP: Queuing packet to 10.3.0.1 > Jul 5 03:22:33.851 cst: SNMP: V1 Trap, ent products.310, addr 10.20.0.1, gentrap 2, > spectrap 0 > ifEntry.1.13 = 13 > ifEntry.2.13 = FastEthernet3/9 > ifEntry.3.13 = 6 > lifEntry.20.13 = administratively down > Jul 5 03:22:34.079 cst: %SYS-5-CONFIG_I: Configured from console by vty2 (10.3.0.9) > **************************************************************** > > I need to write a simple regular expression which matches the occurance of the > combination of pattern as shown in RED. > > I have to write many such reg. expressions but thay have to be simple and preferably > a one liner. As far as I know nobody can see which of your text is shown in red. Please post in ASCII to newsgroups in general. Also, what is this fascination with one-liners? The best solution is one which describes the problem clearly. I doubt if I'd be congratulated for offering a recipe for Angel Cake within a single sentence? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]