Artifacts Associated With Ticket 838711ffffffffff
Ticket change [25ae8fa940] (rid 88212) by nobody on 2003-11-09 10:14:00:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Tcl Version :8.4.4 OS Platform :LINUX red hat 7.3 Problem Behavior: matching variables are not being set when there is + in the end of the pattern %regexp -all {([0-9|A-Z]*)} {31MAR+} match var 2 %puts $var %regexp -all {([0-9|A-Z]*)} {31MAR} match var 1 %puts $var 31MAR - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "43. Regexp"
- title initialized to: "matching variables are not being set correctly"
- type initialized to: "Bug"
Ticket change [0967411c49] (rid 89715) by msofer on 2003-11-09 18:48:59:
- assignee changed to: "dgp"
- closedate changed to: "2003-11-09T11:48:59"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 There is no bug here? Look at what is happening if you return both matches inline: % regexp -inline -all {([0-9|A-Z]*)} {31MAR+} 31MAR 31MAR {} {} % regexp -indices -inline -all {([0-9|A-Z]*)} {31MAR+} {0 4} {0 4} {5 4} {5 4} This is probably not what the programmer wanted, but it is what he requested in the regexp: a sequence of 'ZERO or more digits, "|" or caps', and return the matching sequence. Two such sequences are found here: "31MAR" (wanted) and a zero length one. The pattern seems badly specified to me, a proper definition of zero-length matches is at least difficult. The correct thing would have been to request a sequence of ONE or more such symbols (+ instead of *) % regexp -inline -all {([0-9|A-Z]+)} {31MAR+} 31MAR 31MAR BTW, I can imagine that the wanted regexp is actually {([0-9A-Z]+)} - ie, that the symbol "|" should not match - but this is second-guessing the submitter. Assigning to another mainatiner for confirmation of this dismissal. - login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Pending"
- username: "msofer"
Ticket change [e47ade4849] (rid 87958) by dgp on 2003-11-10 21:55:57:
- closedate changed to: "2003-11-10T14:55:57"
- closer changed to: "dgp"
- foundin changed to: "obsolete: 8.4.4"
- icomment:
Logged In: YES user_id=80530 The pattern matches the empty string. The default "greedy" scheme of matching sucks up the whole string as the first match, though. Then the trailing empty string is the only one left that can match. Consider: % regexp -all -inline {[0-9|A-Z]*} 31MAR+ 31MAR {} I see no bug here. - login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dgp"
Ticket change [26f02983ca] (rid 88434) by dkf on 2003-11-11 02:31:06:
- icomment:
Logged In: YES user_id=79902 Also consider this: %regexp -all -inline {[0-9]+|[A-Z]+} {31MAR+} 31 MAR - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment: