Home Download Buy Blog Forum Support

More flexible file_regex parser

More flexible file_regex parser

Postby bluebird75 on Sun Sep 23, 2012 7:08 pm

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<name>...) ought to be feasible.
bluebird75
 
Posts: 5
Joined: Mon Jul 16, 2012 8:58 am

Re: More flexible file_regex parser

Postby bluebird75 on Sun Sep 23, 2012 7:21 pm

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.
bluebird75
 
Posts: 5
Joined: Mon Jul 16, 2012 8:58 am


Return to Plugin Development

Who is online

Users browsing this forum: MarcusF and 5 guests