

function keepAlnum_for_gmgn(string) {
    return string.replace(/[^a-zA-Z0-9\.\s\+\-]/g, ' ');
}
console.log(keepAlnum("Hello, World! 123")); // 输出: "Hello  World  123"
console.log(keepAlnum("Special@#$%^&*()Chars")); // 输出: "Special       Chars"
console.log(keepAlnum("Keep.alnum+and-space")); // 输出: "Keep.alnum+and-space"