Regex keyword list
-
Hello! I hope you are well! I have a question: does notepad++ support regex in the list of keywords for a UDL?
Thanks. -
No, it does not.
However, you can use the EnhanceAnyLexer plugin to use a regex to change the foreground color on words for a UDL.
Assuming you had a udl called
MyUDL
, then the config section[MyUDL] 0x0000FF = \bword\d+\b 0x00FF00 = \bgreen_\w+\b
that would color
word1
orword987
as red, and anything starting withgreen_
using a green foreground.Using that idea, you could define most of your UDL’s keywords in the normal UDL interface, and add EnhanceAnyLexer to do additional keywords using regex