forked from p34709852/monkey
Island: Escape '-' character in environment variable regex
Co-authored-by: Shreya Malviya <shreya.malviya@gmail.com>
This commit is contained in:
parent
d2dda4519f
commit
638db3d7e0
|
@ -9,7 +9,7 @@ const linuxPathStartsWithTildeRegex = /^~/ // path starts with `~`
|
||||||
|
|
||||||
|
|
||||||
const windowsAbsolutePathRegex = /^([A-Za-z]:(\\|\/))/ // path starts like `C:\` OR `C:/`
|
const windowsAbsolutePathRegex = /^([A-Za-z]:(\\|\/))/ // path starts like `C:\` OR `C:/`
|
||||||
const windowsEnvVarNonNumeric = '[A-Za-z#\\$\'\\(\\)\\*\\+,-\\.\\?@\\[\\]_`\\{\\}~+ ]'
|
const windowsEnvVarNonNumeric = '[A-Za-z#\\$\'\\(\\)\\*\\+,\\-\\.\\?@\\[\\]_`\\{\\}~+ ]'
|
||||||
const windowsPathStartsWithEnvVariableRegex = new RegExp(
|
const windowsPathStartsWithEnvVariableRegex = new RegExp(
|
||||||
`^%(${windowsEnvVarNonNumeric}+(${windowsEnvVarNonNumeric}|\\d)*)%`
|
`^%(${windowsEnvVarNonNumeric}+(${windowsEnvVarNonNumeric}|\\d)*)%`
|
||||||
) // path starts like `$` OR `%abc%`
|
) // path starts like `$` OR `%abc%`
|
||||||
|
|
Loading…
Reference in New Issue