Community
    • Login

    Trouble searching and finding "same" but unique strings...

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 433 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.
    • Jason SederquistJ
      Jason Sederquist
      last edited by

      Hello, All…

      I have taken a Google document that was saved as a “webpage” and done my best to strip said page of all the extraneousness info and such that came along with the doc. One thing I’m stuck with, though, other than going through and deleting all +200 of them by hand, is how to “find” all instances of the string below and remove them. The first 8 or so characters are all that all the strings have in common, and the stuff after the = is all unique. I have other comments on this HTML page (the <!— —> part), so I’d rather just find this string only and hit replace once, though I AM willing to go one by one through the dialogue if that’s my only option. (plus I’d like to learn how to find strings like this)

      (The string is PART of what Google attached to each link in the doc, in case you’re wondering)

      Thank you!

      <!— 1653968134844017&usg=AOvVaw1H8msCz9SYyLtNBAiFi5ob" —>

      Terry RT 1 Reply Last reply Reply Quote 0
      • Terry RT
        Terry R @Jason Sederquist
        last edited by Terry R

        @jason-sederquist said in Trouble searching and finding "same" but unique strings...:

        so I’d rather just find this string only and hit replace once,

        As your 1 example line wasn’t inserted within a black box (you would need to read the "Please Read this before Posting) it’s possible what we are seeing isn’t exactly what you have. I will try and compensate for that possibility.

        Regular Expressions (regex for short) act like a filter and make comparisons with the text in the file. It is possible to make a regex to cover what you need. Using the Replace function we have
        Find What:(?s)<!— 1653968134844017&usg.+?—>
        Replace with: empty field here, nothing.
        search mode is regular expression

        You could first use the Find What string in the Find function and click on “count” or even “Find all in current document”. The first will do a count only returning a number. This is your first check as if it is substantially different from the 200 (or so) that you expect then maybe the string is wrong, hence your example may have been altered in posting. The “Find All in current document” will open a 2nd window in Notepad++ showing the occurrences and line where found, so a more extensive check is possible before removing. If you are happy, the Replace function as shown above will remove all those strings if you click on “Replace All”.

        If however the count or search shows very little I’d suggest selecting the first portion from your file (the <-- 165…), then inserting that into the Find What field and adding in the (?s) and .+?-> portions and repeating the steps above (count, find in current doc etc).

        If you are still having problems then read that post I referred to and insert examples as per the template (referred to in that post, “Template for Search/Replace Questions”).

        Terry

        1 Reply Last reply Reply Quote 1
        • Jason SederquistJ
          Jason Sederquist
          last edited by

          This browser I’m using obviously cannot handle this website… I cannot place images in the compose box, nor reply to YOUR post…

          Anyway, I DID actually just now get the original search I tried to work. I have NO idea why it didn’t before. I just entered the first bit of the string and followed the rest the the period mark. Finds them all.
          Thanks!

          Terry RT 1 Reply Last reply Reply Quote 0
          • Terry RT
            Terry R @Jason Sederquist
            last edited by

            @jason-sederquist said in Trouble searching and finding "same" but unique strings...:

            I cannot place images in the compose box, nor reply to YOUR post…

            When replying to a post, you normally either select something in the post you replying to (you’ll see some reference in my one to some text in yours) or just click on the “reply” text (in red) bottom left of the post you are replying to.

            To insert an image, I would put it in my clipboard (so on Windows Ctrl-C), then in the compose window Ctrl-V and it inserts a temporary link. It will then quickly upload that image which will show when the post is “submitted”.

            Good thing you were able to sort yourself out anyways. We are here if things get more complicated for you, so don’t hesitate. But if posting examples please do follow the guidelines. We find most of the issues solving people’s problems is getting the initial examples right.

            Terry

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