Re: Regex issue

2013-01-06 Thread midhun
Ya, this code is perfect Punit. This works fine for me too. Regards, Midhun On Thu, Jan 3, 2013 at 4:46 PM, Paul Johnson wrote: > On Thu, Jan 03, 2013 at 03:53:20PM +0530, punit jain wrote: > > Hi, > > > > I am facing issues in parsing using Regex. The problem definition is as > > below : - > >

Re: Regex issue

2013-01-03 Thread Paul Johnson
On Thu, Jan 03, 2013 at 03:53:20PM +0530, punit jain wrote: > Hi, > > I am facing issues in parsing using Regex. The problem definition is as > below : - > I want to parse it in such a way that all data with BEGIN and END goes in > one file and BEGINDL and ENDDL goes in other with kind of proces

Re: Regex issue

2013-01-03 Thread Shlomi Fish
Hi Punit, some comments on your code: On Thu, 3 Jan 2013 15:53:20 +0530 punit jain wrote: > Hi, > > I am facing issues in parsing using Regex. The problem definition is as > below : - > > A file with data :- > > BEGIN > country Japan > passcode 1123 > listname sales > contact ch...@example.c

Regex issue

2013-01-03 Thread punit jain
Hi, I am facing issues in parsing using Regex. The problem definition is as below : - A file with data :- BEGIN country Japan passcode 1123 listname sales contact ch...@example.com contact m...@example.com END BEGIN country Namibia passcode 9801 listname dept contact l...@example.com END BEGIN

Re: Regex Issue

2007-08-29 Thread Chas Owens
On 8/29/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote: snip > But i want to read only the elements of the Enum and the values assigned to > those elements. I dont want to read the Enum names and the extra characters. > I am unable to filter them. snip Sometimes one regex is not enough. The fol

Regex Issue

2007-08-28 Thread Dharshana Eswaran
Hi All, I have written a program, use strict; use warnings; my $Enum = "typedef enum _SIGNAL_E { LEVEL_0_EV = 0, LEVEL_1_EV, LEVEL_2_EV, LEVEL_3_EV, LEVEL_4_EV, LEVEL_5_EV } SIGNAL_E;"; my $Enumidentifier = qr{ [A-Z0-9_]\w* }xs; my $Enumstatement = qr{ \s*