User Define Language Extensions - too many causes a crash, but not enough allowed
I have several hundred log files that I would like to automatically be applied with a User Defined Language. The extension of the files range from .1 to .200, however, it would appear that you can only add a certain number of extension into the list box. I have tried editing the Userdefinedlanguage.xml file directly, but this simply case Notepad++ to crash.
Is there a way to define a RegEx pattern to match?
UDL doesn’t understand RegEx yet. But I have provided a script solution here which could be modified
to your needs.
Thanks for the feedback. Having looked at the scripts, I believe that they could indeed be modified. I have tasked myself with understanding Python (for 2017), but the modification of the scripts shouldn’t be too much of a pain. I too use other scripts (PowerShell) to open various files so might need to look at some of the other modifications mentioned too.
Maybe it is also worth to create a issue at https://github.com/notepad-plus-plus/notepad-plus-plus/issues about the crashes you could create. Think that shouldn’t happen.
@cheg, sure will do, although user “intervention” in the XML might be seen as fiddling beyond reasonable control (although I suppose the exception should still be caught and handled).
FWIW, if you manually keep adding extensions into the Extension box in the UDL dialogue, it will only save back a certain number of these (I got to 87 with another text extension included). It doesn’t stop you from entering more extensions, only that it saves out a limited set.
To cross reference - https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2727