• Login
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.
  • S
    Sascheya Dragon Shikamaru
    last edited by Sascheya Dragon Shikamaru Feb 13, 2017, 11:24 AM Feb 13, 2017, 11:23 AM

    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?

    S 1 Reply Last reply Feb 13, 2017, 12:46 PM Reply Quote 0
    • S
      Scott Sumner @Sascheya Dragon Shikamaru
      last edited by Feb 13, 2017, 12:46 PM

      @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
      • S
        Sascheya Dragon Shikamaru
        last edited by Sascheya Dragon Shikamaru Feb 13, 2017, 1:13 PM Feb 13, 2017, 1:12 PM

        @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

        S 1 Reply Last reply Feb 13, 2017, 1:36 PM Reply Quote 0
        • S
          Sascheya Dragon Shikamaru
          last edited by Feb 13, 2017, 1:35 PM

          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
          • S
            Scott Sumner @Sascheya Dragon Shikamaru
            last edited by Feb 13, 2017, 1:36 PM

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