Overview
| Artifact ID: | 5ded79ac93c82b01b5024b43c9bd5827025b5389 |
|---|---|
| Ticket: | 471101ffffffffffffffffffffffffffffffffff
RE \A and ^ don't replace the same |
| User & Date: | hobbs on 2001-10-15 03:19:52 |
Changes
- icomment:
Logged In: YES user_id=72656 This is actually ... correct. The problem is with the handling of offsets, and is indicated by the docs for regsub -start (which just allows the user to set the offset). -start index Specifies a character index offset into the string to start matching the regular expression at. When using this switch, `^' will not match the beginning of the line, and \A will still match the start of the string at index. If -indices is specified, the indices will be indexed starting from the absolute beginning of the input string. index will be constrained to the bounds of the input string. This result is actually the same for 8.2. I'm not sure that this is a great feature, but I think the only way to get around it is to get into the guts of the RE.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"