<script type="text/javascript"> var str = "mastertablemastertext"; var patt1 = /master/
i
; //
i is modifier for case-insensitive and g for Global search
alert(str.match(patt1)); </script>
Saturday, March 19, 2011
RegExp in JavaScript
Arrays in Javascript
function start() {
var example=new Array();
example[0]="first";
example[1]="esc";
for(var i=0;i<example.length;i++){
alert(example[i]);
}
example[example.length]="third";
alert(example.length+" "+example["esc"]);
}
Subscribe to:
Posts (Atom)