Overview
| Artifact ID: | 1e142808a118f5d49bc7112ab196d6ee28e56d00 |
|---|---|
| Ticket: | 578363ffffffffffffffffffffffffffffffffff
[:xdigit:] makes RE to behave strange |
| User & Date: | pvgoran on 2002-07-07 14:31:56 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl Version: 8.4a3 Platform: Windows Code sample: set str {2:::DebugWin32} set re {([[:xdigit:]])([[:space:]]*)} puts "[regexp $re $str match xdigit spaces]" puts "match=$match" puts "xdigit=$xdigit" puts "spaces=$spaces" This gives: 1 match=2:::DebugWin32 xdigit=2 spaces=:::DebugWin32 Observed behaviour: "spaces=:::DebugWin32" Desired behaviour: "spaces=" Comment: It looks like the [[:xdigit:]] bracket expression causes the [[:space:]] bracket expression to match any symbol. If [[:xdigit:]] is replaced, for example, by [[:digit:]], or [[:space:]] is replaced by [[:alpha:]], all is going right. (Initially, I noticed this problem with \s instead of [[:space:]].) - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "pvgoran"
- subsystem changed to: "43. Regexp"
- title changed to: "[:xdigit:] makes RE to behave strange"
- type changed to: "Bug"