Regular Expressions 101

Community Patterns

AutoHotkey Syntax Error

0

Regular Expression
PCRE (PHP <7.3)

/
^(?'file'.+?) \((?'line'\d+)\)(?'char') : ==> (?'msg'.*)$
/
gm

Description

This RegEx works nicely in Sublime Text syntax definitions (probably in other places, like Atom, too) without any modification – you might just need to properly escape backslashes.

AutoHotkey does not provide a character number (column number) for its errors, but most places expect it as group #3, so I put it in and left the group blank.

The “Specifically: [...]” part may or may not be matched, depending on how exactly the matching is implemented. In Sublime Text 3 it is not matched.

Submitted by SALZKARTOFFEEEL - 5 years ago