Merge pull request #184 from qidian99/master

Fix regex match error
This commit is contained in:
muwoo authored and GitHub committed 2024-06-12 13:52:04 +08:00
commit e128d01b81
1 file changed
+1 -1
+1 -1
View File
@@ -8,7 +8,7 @@ import useFocus from './clipboardWatch';
function formatReg(regStr) {
const flags = regStr.replace(/.*\/([gimy]*)$/, '$1');
const pattern = flags.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
const pattern = regStr.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
return new RegExp(pattern, flags);
}