Re: matching/nesting anything

2010-09-27 Thread Shlomi Fish
On Monday 27 September 2010 12:21:51 hpant pant wrote: > Hi , > can anyone explain me, how below code works ,dealing with nested patterns. > i am not able to understand the ((?:(?!BEGIN)(?!END).)*) part. > > while (s/BEGIN((?:(?!BEGIN)(?!END).)*)END//gs) { > # do something with $1 >

matching/nesting anything

2010-09-27 Thread hpant pant
Hi , can anyone explain me, how below code works ,dealing with nested patterns. i am not able to understand the ((?:(?!BEGIN)(?!END).)*) part. while (s/BEGIN((?:(?!BEGIN)(?!END).)*)END//gs) { # do something with $1 } Thanks HP