日期:2014-05-16 浏览次数:20332 次
<script type="text/javascript"> <!-- var str = "123abc,2011-09-08 11:22;456abc,2011-09-08 11:22;8&%$#,2011-09-08 11:22;una89,2011-09-08 11:22;"; var rex = /([^,]*),([^;]*);/g,txt ,rs = []; while(txt = rex.exec(str) != null){ rs.push(txt[1]); } alert(rs.join("|")); //--> </script>