Sublime Forum

More flexible file_regex parser

#1

Hi,

I am working on the lua language, for a proper stack trace parsing. I am hitting an issue which is that file_regex in the build system assumes that the first regexp group is the filename, the second one the line number and the third one the message. I would like to use a group to alternate between two expressions, before matching the actual filename. This will confuse sublimetext at the moment.

Is there any way I can do that ? If regexp matching is based on python re module, using named groups with the syntax (?P…) ought to be feasible.

1 Like

#2

Ok, I found a solution looking up the Python re module help.

The syntax (?: ) allows to define a regexp group without the group being counted. Still, named groups would be nice from my point of view.

1 Like