Issue668194
Created on 2003-01-14.23:19:18 by trelony, last changed 2003-02-12.11:01:53 by bckfnn.
File name |
Uploaded |
Description |
Edit |
Remove |
test.jy
|
trelony,
2003-01-14.23:21:03
|
test case |
|
|
msg811 (view) |
Author: Alexey N. Solofnenko (trelony) |
Date: 2003-01-14.23:19:18 |
|
In the following test the first block matching
([^":]*?) contains quotas, but if expression is
([^":]*), it does not match at all. Greedy modifier
cannot affect operation success.
Test program:
import re
s='"file.name" "path/file"'
s2=re.sub(r'^"([^":]*)/([^":/\\]*)"', r'1 #\1#\n2 #\2#', s)
s3=re.sub(r'^"([^":]*?)/([^":/\\]*)"', r'1 #\1#\n2
#\2#', s)
print
"s='"+s+"'\n\n============================\ns2='"+s2+"'\n\n============================\ns3='"+s3+"'"
output (s2 is not changed - no match; s3's first block
contains quotas):
s='"file.name" "path/file"'
============================
s2='"file.name" "path/file"'
============================
s3='1 #file.name" "path#
2 #file#'
|
msg812 (view) |
Author: Finn Bock (bckfnn) |
Date: 2003-02-12.11:01:53 |
|
Logged In: YES
user_id=4201
Already fixed in CVS.
|
|
Date |
User |
Action |
Args |
2003-01-14 23:19:18 | trelony | create | |
|