SbarLua icon indicating copy to clipboard operation
SbarLua copied to clipboard

Confusing regex rule

Open roycefanproxy opened this issue 8 months ago • 0 comments

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:

  1. space.
  2. 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?

roycefanproxy avatar Jun 12 '24 18:06 roycefanproxy