TextReplace: support /v regex flag
This commit is contained in:
parent
484d70fb15
commit
e4bf71784e
|
@ -77,7 +77,7 @@ const settings = definePluginSettings({
|
||||||
});
|
});
|
||||||
|
|
||||||
function stringToRegex(str: string) {
|
function stringToRegex(str: string) {
|
||||||
const match = str.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/); // Regex to match regex
|
const match = str.match(/^(\/)?(.+?)(?:\/([gimsuyv]*))?$/); // Regex to match regex
|
||||||
return match
|
return match
|
||||||
? new RegExp(
|
? new RegExp(
|
||||||
match[2], // Pattern
|
match[2], // Pattern
|
||||||
|
|
Loading…
Reference in a new issue