#1045 bug in rxregexp when using alternatives

None
open
nobody
none
5
2014-02-18
2012-02-09
Anonymous
No

given str1 = " AA2012 " and str2 = " BB2012 "
the following regexp finds a hit in str2 but is failing to find a hit in str1
RE1 = "(AA|BB)[:SPACE:]*[:DIGIT:]"

however the following equivalent regexp does find a hit in both str1 and str2:
RE2 = "(AA[:SPACE:]|BB[:SPACE:])[:DIGIT:]"

testcase attached.

C:>rexx -v
Open Object Rexx Version 4.1.0
Build date: Dec 5 2010
Addressing Mode: 32

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2012-02-10

    Hi,

    Thanks for attaching a test program, especially an actual working test group.

    I'll take a look at this, but I don't understand the reg expr code that well, I might not be able to do anything about it.

     


Anonymous


Cancel   Add attachments