Overview
| Artifact ID: | a1fc5f5f9d67257a33f7c15b4ad8b294cd6fd55a |
|---|---|
| Ticket: | 1230253fffffffffffffffffffffffffffffffff
match array |
| User & Date: | msofer on 2005-07-02 20:36:49 |
Changes
- closedate changed to: "2005-07-02T13:36:49"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 I still do not quite get it. I think you are proposing to have a builtin capability to do something like foreach {- key val} [regexp -all -inline $pattern $source] { set vector($key) $val } What should happen if the pattern does not always produce an even number of submatches? Would that be an error? What if the pattern is capable of producing an odd number of submatches, but doesn't with the particular input : error or not? As it is, I do not think the complication is really worth it. You can easily get this functionality in a proc. It is quite unlikely that the performance impact will be noticeable, if this is what is worrying you: proc calls and [set] are quite a bit faster than [regexp] in any case. - login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Rejected"
- status changed to: "Pending"
- username: "msofer"