Fixed regex for preset name matching.

This commit is contained in:
Shy 2024-08-06 11:00:10 +02:00
parent 24b3b8c945
commit 39323d772a

2
wled
View file

@ -102,7 +102,7 @@ case "$2" in
# Extract number and name of every preset. Right-align numbers. # Extract number and name of every preset. Right-align numbers.
# Drop everything else. # Drop everything else.
sed --sandbox -n \ sed --sandbox -n \
'/^"\(1\?[0-9]\)"[[:space:]]*:.*"n"[[:space:]]*:[[:space:]]*"\([[:print:]]*\)".*$/{ '/^"\(1\?[0-9]\)"[[:space:]]*:.*"n"[[:space:]]*:[[:space:]]*"\([[:alnum:] _-]*\)".*$/{
s//\1: \2/ s//\1: \2/
s/^[0-9]:/ &/ s/^[0-9]:/ &/
p p