Re: group(i) returning null for nested group

"Daniel F. Savarese" <[email protected]>
Newsgroups gmane.comp.jakarta.oro.devel
Message-ID <[email protected]>
In message <[email protected]>, Anakreon Mejdi writes:
>Reg Exp:\s*(\d{1,2})\.(\d{1,2})(-(\d{1,2})\.(\d{1,2}))*(ìì|ðì)
>Input: 7.00-9.00-11.00ìì
...
>If I tried input: 7.00-9.00-11.00-12.30ìì

There is no bug that I can see:

~> echo " 7.00-9.00-11.00ii" | perl -ne 'if ($_ =~ /\s*(\d{1,2})\.(\d{1,2})(-(\d{1,2})\.(\d{1,2}))*(ii|oi)/ ) { print "1: $1\n2: $2\n3: $3\n4: $4\n5: $5\n6: $6\n"; }'
1: 7
2: 00
3: -11.00
4: 11
5: 00
6: ii

~> echo " 7.00-9.00-11.00-12.30ii" | perl -ne 'if ($_ =~ /\s*(\d{1,2})\.(\d{1,2})(-(\d{1,2})\.(\d{1,2}))*(ii|oi)/ ) { print "1: $1\n2: $2\n3: $3\n4: $4\n5: $5\n6: $6\n"; }'
1: 7
2: 00
3: -12.30
4: 12
5: 30
6: ii

The results are exactly the same as with matchResultExample.  This
isn't even a Perl 5.003 vs. Perl 5.6 or 5.8 issue since I used: 

~> perl -v

This is perl, v5.8.0 built for i386-linux-thread-multi


I should note that I used ii and oi instead of ìì and ðì because my shell
windows are using LC_ALL=C.  Anyway, the null problem you initially reported
was a problem and it's been fixed, although maybe we should release v2.0.8
now.  I don't have time to help you with your regular expression; someone
on oro-user can help you with that.  All I can afford to do right now verify
whether or not a bug is a bug to see whether or not it requires more
attention.  You appear to have corrected your regular expression to do what
you intend, so I don't see a problem.

daniel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.