• Login
Community
  • Login

Regex keyword list

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 247 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.
  • F
    filipe Medeiros
    last edited by Sep 30, 2024, 7:23 PM

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

    P 1 Reply Last reply Sep 30, 2024, 8:27 PM Reply Quote 0
    • P
      PeterJones @filipe Medeiros
      last edited by Sep 30, 2024, 8:27 PM

      @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
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors