使用 REReplaceCallback 函式
REReplaceCallback('YOUR REGEX GOES HERE','AND YOUR STRING HERE',function(groups) {
//now you can access the 'groups' array containing all the captured groups
return result; //return whatever you've processed inside
});