Community
    • Login

    Search a files that contains multiple requested words.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    search
    5 Posts 2 Posters 3.1k 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.
    • Sascheya Dragon ShikamaruS
      Sascheya Dragon Shikamaru
      last edited by Sascheya Dragon Shikamaru

      I dont know how to express my self so that people will understand what I need, so I will make an example.
      Lets say I have 4k files like this:

      <ADDRESSID>2</ADDRESSID>
      <DISTRICTTYPE />
      <DISTRICTNAME />
      <STREETTYPE />
      <STREETNAME />
      <POSTALNUMBER>999999</POSTALNUMBER>
      <BLOCK />
      <ENTRY />
      <FLOOR />
      <APNO />
      

      And need to search for the file that has the ADDRESSSID 2 and the POSTAL NUMBER 23.
      How do I do that?

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS
        Scott Sumner @Sascheya Dragon Shikamaru
        last edited by

        @Sascheya-Dragon-Shikamaru

        Assuming that your file repeats over and over something very similar to your sample, this could do it:

        Find what: (?s)<ADDRESSID>2<.+<POSTALNUMBER>23<
        Search mode: Regular expression

        1 Reply Last reply Reply Quote 1
        • Sascheya Dragon ShikamaruS
          Sascheya Dragon Shikamaru
          last edited by Sascheya Dragon Shikamaru

          @Scott Sumner
          First of all , thank you for your replay.
          And, could you please tell me what Im doing wrong?
          https://s31.postimg.org/4s5409f23/Screenshot_2.png

          Scott SumnerS 1 Reply Last reply Reply Quote 0
          • Sascheya Dragon ShikamaruS
            Sascheya Dragon Shikamaru
            last edited by

            It looks like this works only if ADRESSID is first and POSTALNUMBER comes after, otherwhise I will need to swap them.

            1 Reply Last reply Reply Quote 0
            • Scott SumnerS
              Scott Sumner @Sascheya Dragon Shikamaru
              last edited by

              @Sascheya-Dragon-Shikamaru

              From your screenshot, it appears you are searching for your data in the wrong order: you won’t find “ab” if you tell Notepad++ to search for “ba”…

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