Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- retest.py:
- ----------
- import re
- m=re.search(r'name=(.+)', 'name=test')
- if m and m.groups > 0:
- print m.group(1)
- ----------
- % ~/jython2.5.3b1/bin/jython retest2.py
- test
- % ~/jython2.5.3b1/bin/jython -m py_compile retest2.py
- java -cp ~/jython2.5.3b1/jython.jar:. retest2\$py
- Exception in thread "main" Traceback (most recent call last):
- File "retest2$py", line 3, in <module>
- File "/home/joel/jython2.5.3b1/Lib/re.py", line 188, in compile
- return _compile(pattern, flags)
- File "/home/joel/jython2.5.3b1/Lib/re.py", line 239, in _compile
- p = sre_compile.compile(pattern, flags)
- File "/home/joel/jython2.5.3b1/Lib/re.py", line 239, in _compile
- p = sre_compile.compile(pattern, flags)
- File "/home/joel/jython2.5.3b1/Lib/sre_compile.py", line 512, in compile
- p = sre_parse.parse(p, flags)
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 679, in parse
- p = _parse_sub(source, pattern, 0)
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 314, in _parse_sub
- itemsappend(_parse(source, state))
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 534, in _parse
- if sourcematch("?"):
- File "/home/joel/jython2.5.3b1/Lib/sre_parse.py", line 202, in match
- if char == self.next:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement