Community
    • Login

    Which searchFlag will help me?

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    5 Posts 3 Posters 335 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.
    • Peter GoddardP
      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
        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
          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
            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
              rinku singh
              last edited by

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

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