jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: group(i) returning null for nested group
Date Mon, 21 Apr 2003 16:11:42 GMT

In message <3EA40718.8070406@ertonline.gr>, 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



---------------------------------------------------------------------
To unsubscribe, e-mail: oro-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: oro-dev-help@jakarta.apache.org


Mime
View raw message