Notepad++ find, replace etc












0















I have a question regarding notepad++.
I have this text:



enter image description here



And this second one:



enter image description here



Basically I want to delete the countries that appear in image 2, from image 1. How can I do this?










share|improve this question




















  • 2





    don't put text in images. Paste a small sample so that people can try

    – phuclv
    Jan 25 at 3:08
















0















I have a question regarding notepad++.
I have this text:



enter image description here



And this second one:



enter image description here



Basically I want to delete the countries that appear in image 2, from image 1. How can I do this?










share|improve this question




















  • 2





    don't put text in images. Paste a small sample so that people can try

    – phuclv
    Jan 25 at 3:08














0












0








0








I have a question regarding notepad++.
I have this text:



enter image description here



And this second one:



enter image description here



Basically I want to delete the countries that appear in image 2, from image 1. How can I do this?










share|improve this question
















I have a question regarding notepad++.
I have this text:



enter image description here



And this second one:



enter image description here



Basically I want to delete the countries that appear in image 2, from image 1. How can I do this?







notepad++ notepad






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 25 at 0:27









Pimp Juice IT

24.9k114177




24.9k114177










asked Jan 24 at 21:46









Alex IonescuAlex Ionescu

62




62








  • 2





    don't put text in images. Paste a small sample so that people can try

    – phuclv
    Jan 25 at 3:08














  • 2





    don't put text in images. Paste a small sample so that people can try

    – phuclv
    Jan 25 at 3:08








2




2





don't put text in images. Paste a small sample so that people can try

– phuclv
Jan 25 at 3:08





don't put text in images. Paste a small sample so that people can try

– phuclv
Jan 25 at 3:08










2 Answers
2






active

oldest

votes


















3














You should be able to do this in Notepad++ as follows:




  1. Use a normal Find & Replace to replace all the commas in List 2 with ,|, so you end up with a list of countries to delete like Country1,|Country2,|Country3,.

  2. Use this new list as the search term in a Regular Expression mode Find & Replace on List 1, with a blank as the replacement text.


Note that this assumes that country names are just separated by commas (no spaces). The last entry in List 1 should also be followed by a comma, otherwise it won't get matched by the search.






share|improve this answer


























  • note that Country3 doesn't have a comma so you'll have a redundant comma where it was removed

    – phuclv
    Jan 25 at 3:10











  • Good spot @phuclv. I've updated my answer to correct this.

    – JRI
    Jan 25 at 9:11













  • you also need to put a comma to the end of List 1, otherwise the last item won't be matched even if it's in the list

    – phuclv
    Jan 25 at 15:54











  • That's right - I put that in my earlier edit too! :-)

    – JRI
    Jan 25 at 18:17



















0














I do not know how to automate your task in the Notepad++, but if your lists' data are not security critical, you can use script I have written in jsfiddle: https://jsfiddle.net/RomanTarasiuk/ev0fzsog/. Or save the script text into a *.html file and open it in your browser – this way is completely secure, and my script is as simple as possible and cannot damage your computer/smartphone.



Format each of your two lists that each of them are placed in one line, values in them are separated by comma only (no spaces). Put your two lists into first and second textarea accordingly and press button, and your result list will be placed to the third textarea.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398099%2fnotepad-find-replace-etc%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    You should be able to do this in Notepad++ as follows:




    1. Use a normal Find & Replace to replace all the commas in List 2 with ,|, so you end up with a list of countries to delete like Country1,|Country2,|Country3,.

    2. Use this new list as the search term in a Regular Expression mode Find & Replace on List 1, with a blank as the replacement text.


    Note that this assumes that country names are just separated by commas (no spaces). The last entry in List 1 should also be followed by a comma, otherwise it won't get matched by the search.






    share|improve this answer


























    • note that Country3 doesn't have a comma so you'll have a redundant comma where it was removed

      – phuclv
      Jan 25 at 3:10











    • Good spot @phuclv. I've updated my answer to correct this.

      – JRI
      Jan 25 at 9:11













    • you also need to put a comma to the end of List 1, otherwise the last item won't be matched even if it's in the list

      – phuclv
      Jan 25 at 15:54











    • That's right - I put that in my earlier edit too! :-)

      – JRI
      Jan 25 at 18:17
















    3














    You should be able to do this in Notepad++ as follows:




    1. Use a normal Find & Replace to replace all the commas in List 2 with ,|, so you end up with a list of countries to delete like Country1,|Country2,|Country3,.

    2. Use this new list as the search term in a Regular Expression mode Find & Replace on List 1, with a blank as the replacement text.


    Note that this assumes that country names are just separated by commas (no spaces). The last entry in List 1 should also be followed by a comma, otherwise it won't get matched by the search.






    share|improve this answer


























    • note that Country3 doesn't have a comma so you'll have a redundant comma where it was removed

      – phuclv
      Jan 25 at 3:10











    • Good spot @phuclv. I've updated my answer to correct this.

      – JRI
      Jan 25 at 9:11













    • you also need to put a comma to the end of List 1, otherwise the last item won't be matched even if it's in the list

      – phuclv
      Jan 25 at 15:54











    • That's right - I put that in my earlier edit too! :-)

      – JRI
      Jan 25 at 18:17














    3












    3








    3







    You should be able to do this in Notepad++ as follows:




    1. Use a normal Find & Replace to replace all the commas in List 2 with ,|, so you end up with a list of countries to delete like Country1,|Country2,|Country3,.

    2. Use this new list as the search term in a Regular Expression mode Find & Replace on List 1, with a blank as the replacement text.


    Note that this assumes that country names are just separated by commas (no spaces). The last entry in List 1 should also be followed by a comma, otherwise it won't get matched by the search.






    share|improve this answer















    You should be able to do this in Notepad++ as follows:




    1. Use a normal Find & Replace to replace all the commas in List 2 with ,|, so you end up with a list of countries to delete like Country1,|Country2,|Country3,.

    2. Use this new list as the search term in a Regular Expression mode Find & Replace on List 1, with a blank as the replacement text.


    Note that this assumes that country names are just separated by commas (no spaces). The last entry in List 1 should also be followed by a comma, otherwise it won't get matched by the search.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jan 25 at 9:10

























    answered Jan 24 at 22:46









    JRIJRI

    587316




    587316













    • note that Country3 doesn't have a comma so you'll have a redundant comma where it was removed

      – phuclv
      Jan 25 at 3:10











    • Good spot @phuclv. I've updated my answer to correct this.

      – JRI
      Jan 25 at 9:11













    • you also need to put a comma to the end of List 1, otherwise the last item won't be matched even if it's in the list

      – phuclv
      Jan 25 at 15:54











    • That's right - I put that in my earlier edit too! :-)

      – JRI
      Jan 25 at 18:17



















    • note that Country3 doesn't have a comma so you'll have a redundant comma where it was removed

      – phuclv
      Jan 25 at 3:10











    • Good spot @phuclv. I've updated my answer to correct this.

      – JRI
      Jan 25 at 9:11













    • you also need to put a comma to the end of List 1, otherwise the last item won't be matched even if it's in the list

      – phuclv
      Jan 25 at 15:54











    • That's right - I put that in my earlier edit too! :-)

      – JRI
      Jan 25 at 18:17

















    note that Country3 doesn't have a comma so you'll have a redundant comma where it was removed

    – phuclv
    Jan 25 at 3:10





    note that Country3 doesn't have a comma so you'll have a redundant comma where it was removed

    – phuclv
    Jan 25 at 3:10













    Good spot @phuclv. I've updated my answer to correct this.

    – JRI
    Jan 25 at 9:11







    Good spot @phuclv. I've updated my answer to correct this.

    – JRI
    Jan 25 at 9:11















    you also need to put a comma to the end of List 1, otherwise the last item won't be matched even if it's in the list

    – phuclv
    Jan 25 at 15:54





    you also need to put a comma to the end of List 1, otherwise the last item won't be matched even if it's in the list

    – phuclv
    Jan 25 at 15:54













    That's right - I put that in my earlier edit too! :-)

    – JRI
    Jan 25 at 18:17





    That's right - I put that in my earlier edit too! :-)

    – JRI
    Jan 25 at 18:17













    0














    I do not know how to automate your task in the Notepad++, but if your lists' data are not security critical, you can use script I have written in jsfiddle: https://jsfiddle.net/RomanTarasiuk/ev0fzsog/. Or save the script text into a *.html file and open it in your browser – this way is completely secure, and my script is as simple as possible and cannot damage your computer/smartphone.



    Format each of your two lists that each of them are placed in one line, values in them are separated by comma only (no spaces). Put your two lists into first and second textarea accordingly and press button, and your result list will be placed to the third textarea.






    share|improve this answer






























      0














      I do not know how to automate your task in the Notepad++, but if your lists' data are not security critical, you can use script I have written in jsfiddle: https://jsfiddle.net/RomanTarasiuk/ev0fzsog/. Or save the script text into a *.html file and open it in your browser – this way is completely secure, and my script is as simple as possible and cannot damage your computer/smartphone.



      Format each of your two lists that each of them are placed in one line, values in them are separated by comma only (no spaces). Put your two lists into first and second textarea accordingly and press button, and your result list will be placed to the third textarea.






      share|improve this answer




























        0












        0








        0







        I do not know how to automate your task in the Notepad++, but if your lists' data are not security critical, you can use script I have written in jsfiddle: https://jsfiddle.net/RomanTarasiuk/ev0fzsog/. Or save the script text into a *.html file and open it in your browser – this way is completely secure, and my script is as simple as possible and cannot damage your computer/smartphone.



        Format each of your two lists that each of them are placed in one line, values in them are separated by comma only (no spaces). Put your two lists into first and second textarea accordingly and press button, and your result list will be placed to the third textarea.






        share|improve this answer















        I do not know how to automate your task in the Notepad++, but if your lists' data are not security critical, you can use script I have written in jsfiddle: https://jsfiddle.net/RomanTarasiuk/ev0fzsog/. Or save the script text into a *.html file and open it in your browser – this way is completely secure, and my script is as simple as possible and cannot damage your computer/smartphone.



        Format each of your two lists that each of them are placed in one line, values in them are separated by comma only (no spaces). Put your two lists into first and second textarea accordingly and press button, and your result list will be placed to the third textarea.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 24 at 23:00

























        answered Jan 24 at 22:49









        Roman TarasiukRoman Tarasiuk

        173




        173






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1398099%2fnotepad-find-replace-etc%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            Puebla de Zaragoza

            Musa