Confusing regex rule
roycefanproxy opened this issue · comments
Royce commented
It seems like the regex pattern applicable for sketchybar lua api is bash style, but somehow grouping doesn't work.
Example:
I have a few items with name patterns as below:
- space.
- space.padding.
but when I tried to set their property at once via regex pattern as /^space\\.(padding\\.)?[1-6]$/
, I couldn't match any.
However, if I set the property separately with 2 different patterns: /^space\\.[1-6]$/
& /^space\\.padding\\.[1-6]$/
, they worked.
Is it a bug or it's just my regex pattern mistake?