日期:2014-05-16 浏览次数:20401 次
var s="abs((a1+a4)-a5)>d8+d9"; alert(s.replace(/(abs)\(([^\(]*\([^\)]*\)[^\)]*)\)/g,"$1 $2"));
var s="abs((a1+a4)-a5)>d8+d9"; alert(s.replace(/\babs\((.*)\)/g,"abs $1 ")); //abs (a1+a4)-a5 >d8+d9