Community
    • Login

    How to get search partially instead of exact match?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 Posters 879 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.
    • LogeshNguhanL
      LogeshNguhan
      last edited by

      The text file:
      3005490
      3032390
      3053390
      3090546
      3090452
      3090234
      If I search for “3090”, the output would be,
      3090546
      3090452
      3090234

      But I want results like,
      3005490
      3032390
      3053390
      3090546
      3090452
      3090234

      Please help me on this, thanks.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @LogeshNguhan
        last edited by Alan Kilborn

        @LogeshNguhan

        Find: 30\d*?90
        Search mode: Regular expression

        If your goal is to have N++ highlight only those parts you have shown as bolded, in its Search results window or when you use Find Next, then sorry, you’re not going to get that.

        Additional REFerence. And another ONE.

        LogeshNguhanL Neil SchipperN 2 Replies Last reply Reply Quote 4
        • LogeshNguhanL
          LogeshNguhan @Alan Kilborn
          last edited by

          @Alan-Kilborn Thanks for the help. It helped to find all the lines with ‘3090’.
          But is there any way to find only the lines that start with ‘30’ and end with ‘90’?
          (i.e) it should not return result like,
          3009056

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @LogeshNguhan
            last edited by

            @LogeshNguhan said in How to get search partially instead of exact match?:

            is there any way to find only the lines that start with ‘30’ and end with ‘90’?

            Yes, there is. Did you have a look at the references I supplied to you in my previous post?

            LogeshNguhanL 1 Reply Last reply Reply Quote 3
            • LogeshNguhanL
              LogeshNguhan @Alan Kilborn
              last edited by

              @Alan-Kilborn It took some time to understand. Now I got the answer.

              ^30\d*90$

              Thanks.

              1 Reply Last reply Reply Quote 3
              • Neil SchipperN
                Neil Schipper @Alan Kilborn
                last edited by Neil Schipper

                @Alan-Kilborn @LogeshNguhan

                If your goal is to have N++ highlight only those parts you have shown as bolded…

                This could be achieved by using a suitable regex with a logical or directive and Mark All.

                Alan KilbornA 1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn @Neil Schipper
                  last edited by

                  @Neil-Schipper said in How to get search partially instead of exact match?:

                  This could be achieved by using a suitable regex with a logical or directive and Mark All.

                  I meant when using the simple regex I supplied.

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