Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to get search partially instead of exact match?

    Help wanted · · · – – – · · ·
    3
    7
    103
    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.
    • LogeshNguhan
      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 Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        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.

        LogeshNguhan Neil Schipper 2 Replies Last reply Reply Quote 4
        • LogeshNguhan
          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 Kilborn 1 Reply Last reply Reply Quote 0
          • Alan Kilborn
            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?

            LogeshNguhan 1 Reply Last reply Reply Quote 3
            • LogeshNguhan
              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 Schipper
                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 Kilborn 1 Reply Last reply Reply Quote 0
                • Alan Kilborn
                  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
                  Copyright © 2014 NodeBB Forums | Contributors