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