https://www.w3school.com.cn/jsref/jsref_replace.ASP
str.replace(原始字詞, '新字詞');
str.replace('a', 'b');
str.replace(/a/g, 'b');
var path = require('path');
path.resolve(__dirname, '..');
console.log(__dirname);
var str = __dirname;
path = str.replace(/\\/g, '/');
console.log(path);
轉換前
C:\Users\User\Desktop\test\project\20220521_test_todolist2
轉換後
C:/Users/User/Desktop/test/project/20220521_test_todolist2