This is strange, I agree for the results with Allen, I combined the scripts of Morten_rn_dk and Allen with the following result;

 Code:
If @ONWOW64
    $RESULT = SetOption("WOW64FileRedirection", "On")
    $RESULT = SetOption("WOW64AlternateRegView", "On")
Else
    $RESULT = SetOption("WOW64FileRedirection", "Off")
    $RESULT = SetOption("WOW64AlternateRegView", "Off")
EndIf
Cls

? 'OS + patchlevel = ' + RTrim(@PRODUCTTYPE + ' ' + @DOS + ' ' + @CSD) + '.'
? "Kix Version = " + @KIX + @CRLF

$A="1","","2","3","","5","6","7","8","9","10"
? "Morten_rn_dk"
? Join( AScan($A,"9",,,3) , ",")
? "-------------------------------------------------"
? "Allen"
$A="1","","2","3","","5","6","7","8","9","10",19,"9"
? "Return All Exact Matches:" + Join( AScan($A,"9",,,2) , ",")
? "Return All Instr Matches:" + Join( AScan($A,"9",,,3) , ",")


Result;
 Code:
OS + patchlevel = Windows 8.1 Professional Edition 6.3.
Kix Version = 4.64

Morten_rn_dk
9
-------------------------------------------------
Allen
Return All Exact Matches:9,12
Return All Instr Matches:9,11,12



Edited by Allen (2014-12-04 01:20 AM)
Edit Reason: added code tags