Custom syntax highlight using RegExp

Discussion Forums discussion Custom syntax highlight using RegExp

This topic contains 0 voices and has 1 reply.

Viewing 2 posts - 1 through 2 (of 2 total)
Author Posts
Author Posts
October 28, 2010 at 11:26 pm #5116



I would need some help with a way to have a custom syntax highlight, using regular expression.

I work a lot with software generated traces, that have various messages with common prefixes and suffixes. Something like: (A|B)_(.+)_(request|confirm)




Is there a way to define for example two classes of keywords, one for _request messages, one for _confirm messages, with different styles, and using regular expressions ? I could enter all messages by hand, but there are quite many, and also they change in time.

Thank you in advance!

PS: Using PN 2.1.5 + PyPN 1.12. A PyPN method would also be acceptable, but I would prefer to avoid it for now.



November 10, 2010 at 4:40 pm #17408

Key Master

Without writing a C++ lexer, there is currently no support for this. You could do it with PyPN based on restyling whenever a character is added, but it’s not a supported scenario at the moment so I’ve never tried it.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.