About Sublime Text 3 RegExp engine
Sublime Text uses a propietary regex engine, unless the regular expression uses constructs that are unsupported by it, then Oniguruma will be used instead.
Author wrote about it at the Sublime Text forums:
Sublime Text build 3085 and newer contain a custom, non-backtracking regex engine for syntax highlighting only. It is heavily optimized for the type of matching that happens when lexing source files.
It is not open source, and does not contain some features present in Oniguruma, since it is a different style engine. Whenever possible, the Sublime Text regex engine will be used for a regex pattern in a .sublime-syntax or .tmLanguage file. If the regular expression uses constructs that are not supported by the new engine, Oniguruma will be used instead. We do not currently have any plans on removing the Oniguruma engine, so all existing .tmLanguage files will continue to be supported.
About .{1,3}
.{1,3}
matches any string with 1 to 3 characters. That means that in the word HELLO
it will match HEL
and LO
.
This is .{1,3}
in action in ST3:
Variants
As it could not be what you are looking for, I see some variants that could help in case that your text has words separated by new-line.
^.{1,3}
To match the beginning of every word, if the word has, at least, 3 characters.
Example:
ONE
TO
TWO
THREE
will match: ONE
, TWO
, THR
.{1,3}$
To match the end of every word, if the word has, at least, 3 characters.
Example:
ONE
TO
TWO
THREE
will match: ONE
, TWO
, REE
^.{1,3}$
To match every word that has 1 to 3 characters.
Example:
ONE
TO
TWO
THREE
will match: ONE
, TO
, TWO