var st= "A[b]c[d]e[f]g";
var reg =/[w]/ig;
var S1 = st.replace (Reg, "");
var s2=[];
var arr;
while ((Arr=/[w]/ig.exec (ST))!=null) S2.push (arr[0]);
alert (S1);
Alert (S2.join (""));
var st= "A[b]c[d]e[f]g";
var reg =/[w]/ig;
var S1 = st.replace (Reg, "");
var s2=[];
var arr;
while ((Arr=reg.exec (ST))!=null) S2.push (arr[0]);
alert (S1);
Alert (S2.join (""));
var rx =/<a href=[' "] (. *) ['"]>.*</a>/g;
var s= ' <a href= "x" >x</a>n<a href= "y" >y</a>n<a href= "z" >z</a>n ";
document.write (' Found the following link URLs in the string:<br/><ul> ');
while (matches = Rx.exec (s)) {
document.write (' <li> ' + matches[1] + ' </li>n ');
}
document.write (' </ul> ');
var s= ' <a href= ' x ' >x</a>n<a href= ' y ' >y</a>n<a href= ' z ' >z</a>n ';
document.write (' Found the following link URLs in the string:<br/><ul> ');
while (matches =/<a href=[' "] (. *) [']>.*</a>/g.exec (s)] {
document.write (' <li> ' + matches[1 ] + ' </li>n ');
}
document.write (' </ul> ');