Re: nested pattern match

2003-08-01 Thread Rob Dixon
"Raghupathy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Rob and David, > > Thanks very much! That's exactly what I am looking > for and sorry for the misleading subject on the email. > > > Rob: Could you please explain why you need 2 questions > marks on line#7 instead of just

Re: nested pattern match

2003-08-01 Thread Raghupathy
Rob and David, Thanks very much! That's exactly what I am looking for and sorry for the misleading subject on the email. Rob: Could you please explain why you need 2 questions marks on line#7 instead of just one minimal quantifier needed (I hope I am using the right words this time !!!). Tha

Re: nested pattern match

2003-07-31 Thread david
Raghupathy wrote: > Rob, > >The input file you described is not correct, since > it has > #ifdef def2 > statement3; > #else > statement4; > #endif > nested within another #ifdef ... #else ... #endif. > > My input file is the output of > "diff -D def file1 file2" (on unix). This will > gen

Re: nested pattern match

2003-07-31 Thread Raghupathy
Rob, The input file you described is not correct, since it has #ifdef def2 statement3; #else statement4; #endif nested within another #ifdef ... #else ... #endif. My input file is the output of "diff -D def file1 file2" (on unix). This will generate a file which has the following pattern

Re: nested pattern match

2003-07-31 Thread Rob Dixon
Raghupathy wrote: > Hi All, > > I have a text file as shown below. How do I match > patterns like the following: > > Pattern to be matched: > = > #ifndef def > .. (anything except #if) > #else def > ... (anything except #if) > #endif def > > > My Input Data: > =

nested pattern match

2003-07-31 Thread Raghupathy
Hi All, I have a text file as shown below. How do I match patterns like the following: Pattern to be matched: = #ifndef def .. (anything except #if) #else def ... (anything except #if) #endif def My Input Data: ==