Community
    • Login

    Replace based on input CSV file

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 874 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.
    • Willem SwanepoelW Offline
      Willem Swanepoel
      last edited by Willem Swanepoel

      I have a csv file that contains search strings/replace strings.

      Can I use it as input to search and replace strings in another file?

      CSV FIle looks like this:
      ? ALEF,א ALEF
      ? BET,ב BET
      ? GIMEL,ג GIMEL
      ? DALET,ד DALET
      ? HE,ה HE
      ? WAW,ו WAW
      ? ZAJIN,ז ZAJIN
      ? GET,ח GET
      ? TET,ט TET
      ? JOD,י JOD
      ? KAF,כ KAF
      ? LAMED,ל LAMED
      ? MEM,מ MEM
      ? NUN,נ NUN
      ? SAMEK,ס SAMEK
      ? AJIN,ע AJIN
      ? PE,פ PE
      ? TSADE,צ TSADE
      ? KOF,ק KOF
      ? RESJ,ר RESJ
      ? SJIN,שׁ SJIN
      ? SIN ? SJIN,שׂ SIN שׁ SJIN
      ? TAW,ת TAW

      So I want to search a file for all the strings on the left and replace y the string to the right of the comma.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @Willem Swanepoel
        last edited by Alan Kilborn

        @Willem-Swanepoel

        You would likely need to use a scripting plugin for such replacement. Maybe search this forum for “replace from list” or something similar.

        For example, THIS appears to be a script that solves a problem similar to your need, although not exactly.

        Sometimes a regular expression replacement operation can do it, by combining your data and your list together in a single file tab, but this method may not be reliable on larger data sets.

        1 Reply Last reply Reply Quote 1

        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