Sublime Forum

Sublime syntax match using "." bug?

#1

Hi.
If I do something like this:
- match: ‘\w*\[.*\]’
At the “[.*\]” part, it starts from the first “[” and stops at the last “]” it finds.
How can I make it stop at the first “]” it finds instead?

0 Likes

#2

Use a lazy quantifier .*?, or any char except close square bracket [^]]*

1 Like

#3

The second one works. Thank you so much for the quick response!

0 Likes