|
2010-04-15
| ||
| 09:55 | • New ticket [2987620fff] tutorial: typo in regexps (chap More Examples Of Regular... artifact: bd75ebff44 user: grahack | |
tutorial: typo in regexps (chap More Examples Of Regular Exp
Open2987620fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-04-15 09:55:58
There are two occurrences of )* in this page:
http://www.tcl.tk/man/tcl/tutorial/Tcl20a.html
which are:
capture the digits before and after the period for special processing: [-+]?([0-9])*\.?([0-9]*)
and
then "([^"])*" will capture the text inside the double quotes.
It should be *).
% set s 87.65
87.65
% regexp {([0-9])*\.?([0-9]*)} $s all first sec
1
% set first
7 <---- BAD
% set sec
65
% set s {"tavu"}
"tavu"
% regexp {"([^"])*"} $s all res
1
% set res
u <---- BAD TOO
Log in (anonymous is fine) to add a comment.