Modify ↓
Opened 12 years ago
Closed 12 years ago
#2618 closed Bug (Fixed)
_StringBetween malfunction when before and after parameters are identical
| Reported by: | Morthawt | Owned by: | Melba23 |
|---|---|---|---|
| Milestone: | 3.3.11.3 | Component: | Standard UDFs |
| Version: | 3.3.10.2 | Severity: | None |
| Keywords: | Cc: |
Description
As documented in this post: http://www.autoitscript.com/forum/topic/157716-stringbetween-issue-causing-muddy-results/
When ever you use the before and after as the same string, you end up getting a completely messed up result. For example
#include <String.au3>
$test = '<"100" tester="Things">Nowhere'
$result = _StringBetween($test, '"', '"')
For $a In $result
ConsoleWrite($a & @CRLF)
Next
The result you should get is:
100
Things
But in fact what you end up with is:
100
tester=
Things
Attachments (0)
Change History (4)
comment:1 by , 12 years ago
comment:3 by , 12 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:4 by , 12 years ago
| Milestone: | → 3.3.11.3 |
|---|---|
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [9678] in version: 3.3.11.3
Note:
See TracTickets
for help on using tickets.

As explained in that thread, the results are not "messed up", they are just not what you were expecting and what was the case in previous releases.
As it seems that there is a requirement for both the "old" and "new" behaviour the obvious answer is to add a parameter to switch between them - so we are looking into that.
M23