|
From: Brian Z. <bri...@ya...> - 2001-03-04 20:03:06
|
C:\Python20>python
ActivePython 2.0, build 202 (ActiveState Tool Corp.)
based on Python 2.0 (#8, Oct 19 2000, 11:30:05) [MSC 32 bit (Intel)] on
win32
Type "copyright", "credits" or "license" for more information.
>>> import re
>>> w = 'MixedCaseWord'
>>> m = re.match(r'\b([A-Z][a-z]+){2,}\b', w)
>>> m
<SRE_Match object at 008005C0>
>>> m.group(0)
'MixedCaseWord'
While using jython-cvs with -Dpython.home=C:\jython-2.0
C:\jython-cvs>jython
Jython 2.1pre-a1 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> import re
>>> w = 'MixedCaseWord'
>>> m = re.match(r'\b([A-Z][a-z]+){2,}\b', w)
>>> m
>>> m.group(0)
Traceback (innermost last):
File "<console>", line 1, in ?
AttributeError: 'None' object has no attribute 'group'
>>>
Anything I'm missing? is there a difference in re syntax? or is this a bug?
Thanks,
/Brian
|