Own language highlighting with regex expressions?
Manolo Müller Menendez
I want to create a own language highlighting for number coded logs. A log string looks like this:
First a identifier, than a timestamp and then additional information seperated by commas. I would like to do it via Regex but I dont know if that is possible. Anyone with an idea?
UDL doesn’t support regex yet which means you either have to write your own lexer as a plugin
or you use some scripting languages like python script and lua script to do it.
Next decision would be if the formatting should be updated constantly while file changes or
if it is only necessary on load as file content will not change. Latter is much easier to implement
as you only have to deal with bufferactivated callback.
not regex for highlighting, and you would have to add tags (use regex for this if you wish)
modify lines as follows
!_ 8,@_ 20161220073941.1,#_ 16.662422,$_ 63.009957,%_ 144,1,11,1,-3599,93
user language … operators & delimiters
delimiter style1: color red
delimiter style2: color blue
delimiter style3: color yellow
and so on
it is a hack, but it works
hope this helps
I see you’ve posted exactly one time, so maybe the odds are good that you aren’t lurking and just waiting on an answer to your question, but since @Js-jS has refreshed this old thread, and @Claudia-Frank just yesterday posted something that may work to solve it, have a look at: