mirror of
https://github.com/rubickCenter/rubick
synced 2025-07-29 13:11:51 +08:00
Compare commits
No commits in common. "e128d01b81bf38fa818130028fdd62dc76ad7c52" and "c3bc0bdb9e4bc0db9fa39078c02ca652f41bff62" have entirely different histories.
e128d01b81
...
c3bc0bdb9e
@ -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 = regStr.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
|
const pattern = flags.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1');
|
||||||
return new RegExp(pattern, flags);
|
return new RegExp(pattern, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user