<html> <head> <title> </title> <mce:script type="text/javascript"><!-- var str = "asdfasdf <label>adf>aw <ef <ul>ad </label>asdfasdf <label>adfaadfwefad </label>asdf <br>asdfa </br>asdfdf"; var reg = /<label>(.*?)<//label>/img; var arr=[]; var temp = []; while(temp=reg.exec(str)){ //alert(temp[0]); alert(temp[1]); /* arr.push(temp[1]);*/ } /* for (var i in arr ) { alert(arr[i]); }*/ // --></mce:script> </head> <body> <table id="tb" border=1> </table> <input type="button" value="add" id="ok" οnclick="addd();"/> </body> </html> <mce:script type="text/javascript"><!-- var str = '<select multiple="multiple" size="3" name="aaa">' + '<option value="a" selected="selected">a</option>' + '<option value="b">b</option>' + '<option value="c">c</option>' + '</select>' + 'sdadasd' + '<select size="3" name="adassa">' + '<option value="1" selected="selected">1</option>' + '<option value="2">2</option>' + '<option value="3">3</option>' + '</select>'; var reg = /<select[^>]*>.*?<//select>/g alert(str.match(reg)[0] + '/r/n--------------------------/r/n' + str.match(reg)[1]); // --></mce:script>