Overview
| Artifact ID: | 0967411c49085e38e1ebdaa506df1bb66da53256 |
|---|---|
| Ticket: | 838711ffffffffffffffffffffffffffffffffff
matching variables are not being set correctly |
| User & Date: | msofer on 2003-11-09 18:48:59 |
Changes
- 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"