js/jquery银行卡号每4个数字用空格分隔

$(‘#bankAccount’).keyup(function() {
$(this).val($(this).val().replace(/\D/g,”).replace(/(\d{4})(?=\d)/g,”$1 “));
});