mirror of
https://github.com/rubickCenter/rubick
synced 2026-01-11 15:21:34 +08:00
Compare commits
2 Commits
c3bc0bdb9e
...
e128d01b81
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e128d01b81 | ||
|
|
472879f9b2 |
@@ -8,7 +8,7 @@ import useFocus from './clipboardWatch';
|
|||||||
|
|
||||||
function formatReg(regStr) {
|
function formatReg(regStr) {
|
||||||
const flags = regStr.replace(/.*\/([gimy]*)$/, '$1');
|
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);
|
return new RegExp(pattern, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user