Community
    • Login

    Which searchFlag will help me?

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    5 Posts 3 Posters 916 Views 1 Watching
    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.
    • Peter GoddardP Offline
      Peter Goddard
      last edited by

      Hi,

      I am making a plugin that tries to search for every “<” in a text file and place a new line before it. The problem is that the “<” may be inside of a word or between 2 words. Which searchFlag will help me to specify that I want to do this to all “<”? Here’s an example of what I am working with.help5.JPG

      Thanks

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE Offline
        Ekopalypse @Peter Goddard
        last edited by

        @Peter-Goddard

        the searchFlags tell scintilla only how your search_string needs to be interpreted but don’t, magically, find the positions.
        I find the description quite understandable where is your problem here?

        Peter GoddardP 1 Reply Last reply Reply Quote 0
        • Peter GoddardP Offline
          Peter Goddard @Ekopalypse
          last edited by

          @Ekopalypse I just want to make sure I get the right one

          EkopalypseE 1 Reply Last reply Reply Quote 0
          • EkopalypseE Offline
            Ekopalypse @Peter Goddard
            last edited by

            @Peter-Goddard

            Again, there is no wrong or right without knowing what you are trying to achieve and how.
            I know you want to find every occurrence of something, but how do you code it? I mean, if you want to use a regular expression, then you have to use SCFIND_REGEXP, but if you want to search only literally, then you should consider SCFIND_NONE …
            Hard to tell which one is the right one.

            1 Reply Last reply Reply Quote 1
            • rinku singhR Offline
              rinku singh
              last edited by

              find < and replace it with \r\n< by regex

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors