User Defined Languages Regex new feature.
-
I have a particular type of log that includes a datatype that starts with a “p” followed by four hex digits, and “-t” followed by another 4 hexs.
This is an example:
p1500-t1A5C-other data
p1AA8-t1ED0-other data
p1500-t1A7C-other dataIt would be very helpful if Styler could support regex to format this kind of headers.
-
There have been requests for years for the UDL to accept regular exprssions; it still doesn’t, and that is not likely to change.
However, you can add extra highlighting to a builtin lexer (like the HTML lexer) or to a User Defined Language (UDL) using regexes via the script
EnhanceAnyLexer.py
that @Ekopalypse shares in his github repo, if you have the PythonScript plugin installed (Plugins > Plugins Admin, PythonScript, INSTALL). -
Thanks @PeterJones.