match() : Search String for regular expression in JavaScript

JS Script :

<html>
<body>
<script type="text/javascript">
var str="CAT MAT Bat SaT aT&T";
var patt1=/at/gi;
document.write(str.match(patt1));
</script>
</body>
</html>

Output:

AT,AT,at,aT,aT