Community
    • Login

    Create an UDL for my log files

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 442 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.
    • J
      John Huang
      last edited by

      Hi everyone,

      I’d like to create an UDL for my log files.
      I have two questions.

      1. I want to do like this
        alt text

      How to modify open and close parameters for my UDL?
      I tried to modify, but it don’t work.
      alt text

      1. If I have two parametersm, how can I do?
        like this
        alt text

      Thanks,
      John

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @John Huang
        last edited by

        @John-Huang ,

        UDL syntax doesn’t have a wildcard syntax like your [*] or other regex syntax, so that won’t work.

        If you move "=== start" and "=== end" to the “code2 (spaces needed)”, then it will work how I think you intend, even when there are timestamps before the tags.

        48204497-dc7a-4710-a934-36c9998bdbcc-image.png

        Some of ivan-radic’s documentation implies that if you have a space-separated list in those folding boxes that it will only match the one in the same relative position (so if should only match fi in my screenshot)…

        But if you’ve got an imbalance (like you showed with a fi inside the start/end pair), then it goes into “error handling” mode, and apparently assumes that since you don’t have a balance of open and close keywords, that you didn’t realize that open and close keywords need to be balanced, so it will try to mismatch to get better balance – it’s not perfect in that regard, but no error handling is, especially when it’s computers trying to deal with human input.

        But really, what it tells you when you see an open matched with the wrong close is that you’ve probably got a syntax error somewhere. Which could be helpful. (Unless fi has some other meaning thanb end-an-if if it’s found alone between a start and end.)

        UDL is a simple alternative to writing your own lexer plugin, but it cannot give you all the functionality of a purpose-coded lexer plugin; there are limits as to the logic it has available to apply to your UDL.

        J 1 Reply Last reply Reply Quote 2
        • J
          John Huang @PeterJones
          last edited by

          @PeterJones

          Great! This is good for me.
          Thank you.

          John

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