Hi all,

The code:

    pattern = re.compile(u'[&<>"\u0080-\uffff]+')

used to raise a ValueError (see http://bugs.jython.org/issue1544953)
but seems to work fine in Jython 2.2.1 and in the current svn trunk.
However, AFAICT, using this pattern may generate an error with the
current jython trunk.

Jython 2.3a0 on java1.6.0
Type "copyright", "credits" or "license" for more information.
>>> import re
>>> pattern = re.compile(u'[&<>"\u0080-\uffff]+')
>>> pattern.sub(u"e", u"\xc3\xa9")
Traceback (innermost last):
  File "<console>", line 1, in ?
        at org.python.modules.sre.SRE_STATE.SRE_CHARSET(SRE_STATE.java:402)
        at org.python.modules.sre.SRE_STATE.SRE_COUNT(SRE_STATE.java:493)
        at org.python.modules.sre.SRE_STATE.SRE_MATCH(SRE_STATE.java:778)
        at org.python.modules.sre.SRE_STATE.SRE_SEARCH(SRE_STATE.java:1171)
        at org.python.modules.sre.PatternObject.subx(PatternObject.java:129)
        at org.python.modules.sre.PatternObject.sub(PatternObject.java:80)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)

java.lang.ArrayIndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: 163

On the other hand, the 2.2.1 release works:

Jython 2.2.1 on java1.6.0
Type "copyright", "credits" or "license" for more information.
>>> import re
>>> pattern = re.compile(u'[&<>"\u0080-\uffff]')
>>> pattern.sub(u"e", u"\xc3\xa9",)
u'e'
>>>

Can anyone confirm this ? Is this issue already known ?

Cheers,

SB