DarkHack
Newcomer
- Joined
- Dec 14, 2021
- Messages
- 3
- Reaction score
- 0
Hi,
I search to use some path with '[' and ']', but in unix maybe windows too,
for mkdir path, like
#find \[dw\]/\[core\]/
[dw]/[core]/
[dw]/[core]/dwInit
[dw]/[core]/dwInit/client
I have to escape the '[' by '\', so with gsub,
I had tried :
path:gsub(string.format("%c", 91),string.format("%c%c", 92,91))
return :
malformed pattern (missing ']')
I search to use some path with '[' and ']', but in unix maybe windows too,
for mkdir path, like
#find \[dw\]/\[core\]/
[dw]/[core]/
[dw]/[core]/dwInit
[dw]/[core]/dwInit/client
I have to escape the '[' by '\', so with gsub,
I had tried :
path:gsub(string.format("%c", 91),string.format("%c%c", 92,91))
return :
malformed pattern (missing ']')