abcvkf Only delete the front * sign, and keep the middle and back ones. How should the regular expressions be matched?
学习是最好的投资!
Okay, it is always transcoded. Look at the picture. As long as the replace is not global, it will be fine.
'****abc*vkf****'.replace(/[\*]+/, '')
Is this so? Use zero-width assertion http://www.cnblogs.com/deerch...
var s = '****abc*vkf****', res = s.replace(/\**(?=abc)/g,'');
var str="abcvkf*";
var rex=/^*+/ig;
str.replace(rex,"")
Okay, it is always transcoded. Look at the picture. As long as the replace is not global, it will be fine.
Is this so? Use zero-width assertion http://www.cnblogs.com/deerch...
var str="abcvkf*";
var rex=/^*+/ig;
str.replace(rex,"")