﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3976	StringRegExp can create invalid arrays (just like StringSplit)	jchd18	Jon	"The issue raised by ticket #3972 applies as well to StringRegExp, for the very same reason.

{{{#!autoit
Global $s = ' '
For $i = 0 To 24 Step 1
        $s = $s & "";"" & $s
Next
ConsoleWrite(StringLen($s) & @CRLF)
; String is now 33,554,432 symbols long with 33,554,431 delimiters

Global $a = StringRegExp($s, '(.[^;]*);?', 3) ; Also works with flag 4.
Global $err = @error, $ext = @extended
ConsoleWrite('@error = ' & $err & @CRLF) ; @error is not set, because delimiters were indeed found
ConsoleWrite('@extended = ' & $ext & @CRLF) ; Just to be sure it is also 0.
ConsoleWrite('VarGetType = ' & VarGetType($a) & @CRLF) ; It is an array
ConsoleWrite('UBound = ' & UBound($a) & @CRLF) ; UBound works (propably because Array-Metadata are set before the array is filled, I don't know the code so this is guesswork)
ConsoleWrite($a[0] & @CRLF) ; This will fail -> Array variable has incorrect number of subscripts
}}}"	Bug	assigned		AutoIt	3.3.16.1	None			
