Community
    • Login

    Regex keyword list

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 165 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • filipe MedeirosF
      filipe Medeiros
      last edited by

      Hello! I hope you are well! I have a question: does notepad++ support regex in the list of keywords for a UDL?
      Thanks.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @filipe Medeiros
        last edited by

        @filipe-Medeiros

        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 or word987 as red, and anything starting with green_ 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

        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors