This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | jorendorff |
|---|---|
| Recipients | jorendorff, mark.dickinson |
| Date | 2008年04月04日.20:37:56 |
| SpamBayes Score | 0.14858255 |
| Marked as misclassified | No |
| Message-id | <1207341537.41.0.695666739868.issue2537@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Huh. Maybe you're right. JavaScript, Ruby, and Perl all accept both regexes, although no two agree on what should be captured: js> "xyyzy".replace(/((x|y)*)*/, "(1,ドル 2ドル)") (xyy, y)zy js> "xyyzy".replace(/((x|y+)*)*/, "(1,ドル 2ドル)") (xyy, yy)zy >> "xyyzy".sub(/((x|y)*)*/, "(\1,円 \2円)") => "(, y)zy" >> "xyyzy".sub(/((x|y+)*)*/, "(\1,円 \2円)") => "(, yy)zy" DB<1> $_ = 'xyyzy'; s/((x|y)*)*/(1円 2円)/; print ( )zy DB<2> $_ = 'xyyzy'; s/((x|y+)*)*/(1円 2円)/; print ( yy)zy Ruby's behavior seems best to me. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年04月04日 20:38:57 | jorendorff | set | spambayes_score: 0.148583 -> 0.14858255 recipients: + jorendorff, mark.dickinson |
| 2008年04月04日 20:38:57 | jorendorff | set | spambayes_score: 0.148583 -> 0.148583 messageid: <1207341537.41.0.695666739868.issue2537@psf.upfronthosting.co.za> |
| 2008年04月04日 20:37:57 | jorendorff | link | issue2537 messages |
| 2008年04月04日 20:37:56 | jorendorff | create | |