Community
    • Login

    Doing a global search & replace in Notepad

    Scheduled Pinned Locked Moved General Discussion
    database useconvert notepadfile conversionconvert file
    2 Posts 2 Posters 2.6k Views 2 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.
    • Bruce HopkinsB Offline
      Bruce Hopkins
      last edited by

      [I’m running Windows 7, if that has any bearing on my problem.] I have a .txt database from 2007-8 of 3,000 to 4,000 email addresses. I’m trying to convert all of them from the email program I used to use (can’t remember its name) to a simple comma(,) to build a comma-delimited database. Here’s a sample of what I’m trying to do in Notepad:

      “sharonking@yahoo.com|subscribed|2008/08/22||” ------> “sharonking,” (The quotation marks are not used in the conversion [and not her real addy].)

      In 1/2 of the conversions, I successfully did THAT by using this Search & Replace formula:

      REPLACE “|subscribed|2008/*” ------> WITH “,” and I would end up with “sharonking,” (Again, the quotation marks, and REPLACE/WITH are only here for YOUR benefit to help understand.)

      The “global Search & Replace” worked marvelously. BUT, for the OTHER 1/2 (formatted the exact same way) it doesn’t work at all. I’m stuck having to manually change each entry.

      Any ideas on how to re-automate the misbehaving half?? Would I need to import (if it can be done) into Wordpad, or some other program?

      If this program tries to send the reply to my unused .Spamcop address, please manually send it to me at foodstr7 at gmail.com.

      Thank you for any help you can provide!

      Bruce
      http://www.internet-grocer.net

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Bruce Hopkins
        last edited by

        @Bruce-Hopkins
        not sure how it did work at all.

        I assume that the data is allways in the form

        name@domainPIPE… (PIP is ofcourse | )

        in such case I would use the following regex in find

        \|.*$
        

        and replace it with a comma.

        Make sure regex has been selected.

        Cheers
        Claudia

        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