| Ticket UUID: | 2987620 | ||
| Title: | tutorial: typo in regexps (chap More Examples Of Regular Exp | ||
| Type: | Bug | Created on: | 2010-04-15 09:55:58 |
| Submitter: | grahack | Assigned to: | davidw |
| Subsystem: | 75. Tutorial | Severity: | |
| Priority: | 5 Medium | Last modified: | 2010-04-15 09:55:58 |
| Status: | Open | Closed by: | |
| Resolution: | None | Closed on: | |
| Version: | None | ||
| Description: | ||||
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
| ||||
