Sublime Forum

Capturing group order for result_file_regex

#1

When parsing errors such as error 2 in line 1741 of "src/Wonderland.s": unknown mnemonic <dasdvx> I’m currently using this regular expression in my panel’s result_file_regex:

panel_settings.set('result_file_regex', r'^error (?:\d+) in line (\d+) of "([^"]+)": (.+)$')

which captures all the right bits but in the wrong order (clicking on the error tries to open the file 1741).

How do I control the order in which Sublime Text parses the regex’s results?

(this was already asked here and here but never got any answers)

0 Likes