Community
    • Login

    Search Help

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 962 Views 1 Watching
    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.
    • Colin WebsterC Offline
      Colin Webster
      last edited by

      Hi!! I just need some help if anyone can please?

      I am searching a massive file for this…

      4******h&jones.45k

      I am using this to search (^[4].*)(h&jones.45k)

      but my search brings up all possible results. eg 4*****h&jones.45k or 4h&jones.45k.

      I know there is 8 missing characters so how do I return just the ones with 8 missing characters?

      Many thanks

      Col

      Colin WebsterC 1 Reply Last reply Reply Quote 0
      • Colin WebsterC Offline
        Colin Webster @Colin Webster
        last edited by

        Sorry I didn’t explain that too well

        I am after finding all matches with 8 of any character. So for example…

        I get this with (^[4].*)(h&jones.45k)

        49l£drh&jones.45k
        4kg83&dh&jones.45k
        455&h&jones.45k
        445675££_h&jones.45k

        Gives me 100s for results

        Instead I want… all results like so with all lines with 8 characters after 4 ending with h&jones.45k

        487hyCS£lh&jones.45k
        4_5_ki!lkh&jones.45k
        498Ll!-_6h&jones.45k
        487PO4jyYh&jones.45k

        Thanks

        Col

        Alan KilbornA 1 Reply Last reply Reply Quote 0
        • Alan KilbornA Offline
          Alan Kilborn @Colin Webster
          last edited by Alan Kilborn

          @Colin-Webster said in Search Help:

          8 characters after 4 ending with h&jones.45k

          Try:

          Find what box: (?-is)^4.{8}h&jones\.45k
          Search mode radiobuttons: select Regular expression

          Learn to answer questions of this kind yourself in the future; start reading HERE and also check out the N++ user manual’s searching section HERE.

          EDIT:

          After posting originally, I noticed that I should have escaped the literal . in the find-what expression – I’ve corrected that in the above.

          1 Reply Last reply Reply Quote 1
          • guy038G Offline
            guy038
            last edited by

            Hello, @colin-webster, @alan-kilborn and All,

            May be, it’s worth to prefer this search regex :

            SEARCH / MARK : (?-is)^4.{8}h&jones.45k\R

            With this syntax, it should be easier to copy or remove these specific lines, if necessary !

            Best Regards,

            guy038

            1 Reply Last reply Reply Quote 1
            • guy038G Offline
              guy038
              last edited by

              Hi, @colin-webster, @alan-kilborn and All,

              @alan-kilborn is right about the escaped dot ( \. ). So, my solution becomes :

              SEARCH / MARK : (?-is)^4.{8}h&jones\.45k\R

              Cheers,

              guy038

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors