Regex or Excel: Compare multiple lines/rows and find different numbers from parenthesis












0















I have this menu in almost 2.000 html files. Every link have a number between brackets in the final (that number represents the numbers of the articles I have in that section).



<li><a href="link_one.html" title="Link One">Love and Letters (25)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (14)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Now, I have to check if there are any other different numbers than these ones in all 2.000 menu html files. For example, I want to find those .html pages that have a different numbers on link one (26) or on the link 5 (13) like in this menu:



<li><a href="link_one.html" title="Link One">Love and Letters (26)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (13)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Basically, I need to compare and discover numbers that are not the same as in the first menu. Can anyone give me an idea? Remember, I have 2.000 files, so I can compare one by one :(










share|improve this question























  • Do you really have the same menu hardcoded in 2000 files? Why don't you have an unique include file?

    – Toto
    Feb 9 at 15:44











  • because I tested a wrong regex formula, and some elements changed :)

    – Just Me
    Feb 9 at 16:21
















0















I have this menu in almost 2.000 html files. Every link have a number between brackets in the final (that number represents the numbers of the articles I have in that section).



<li><a href="link_one.html" title="Link One">Love and Letters (25)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (14)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Now, I have to check if there are any other different numbers than these ones in all 2.000 menu html files. For example, I want to find those .html pages that have a different numbers on link one (26) or on the link 5 (13) like in this menu:



<li><a href="link_one.html" title="Link One">Love and Letters (26)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (13)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Basically, I need to compare and discover numbers that are not the same as in the first menu. Can anyone give me an idea? Remember, I have 2.000 files, so I can compare one by one :(










share|improve this question























  • Do you really have the same menu hardcoded in 2000 files? Why don't you have an unique include file?

    – Toto
    Feb 9 at 15:44











  • because I tested a wrong regex formula, and some elements changed :)

    – Just Me
    Feb 9 at 16:21














0












0








0








I have this menu in almost 2.000 html files. Every link have a number between brackets in the final (that number represents the numbers of the articles I have in that section).



<li><a href="link_one.html" title="Link One">Love and Letters (25)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (14)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Now, I have to check if there are any other different numbers than these ones in all 2.000 menu html files. For example, I want to find those .html pages that have a different numbers on link one (26) or on the link 5 (13) like in this menu:



<li><a href="link_one.html" title="Link One">Love and Letters (26)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (13)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Basically, I need to compare and discover numbers that are not the same as in the first menu. Can anyone give me an idea? Remember, I have 2.000 files, so I can compare one by one :(










share|improve this question














I have this menu in almost 2.000 html files. Every link have a number between brackets in the final (that number represents the numbers of the articles I have in that section).



<li><a href="link_one.html" title="Link One">Love and Letters (25)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (14)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Now, I have to check if there are any other different numbers than these ones in all 2.000 menu html files. For example, I want to find those .html pages that have a different numbers on link one (26) or on the link 5 (13) like in this menu:



<li><a href="link_one.html" title="Link One">Love and Letters (26)</a></li>
<li><a href="link_two.html" title="Link Two">Books and Readers (23)</a></li>
<li><a href="link_3.html" title="Link 3">Windows and Doors (24)</a></li>
<li><a href="link_4.html" title="Link 4">Names and Addresses (5)</a></li>
<li><a href="link_5.html" title="Link 5">Other Stuff (13)</a></li>
<li><a href="link_6.html" title="Link 6">Cars and Roses (14)</a></li>
<li><a href="link_7.html" title="Link 7">Mobile and Laptop (36)</a></li>


Basically, I need to compare and discover numbers that are not the same as in the first menu. Can anyone give me an idea? Remember, I have 2.000 files, so I can compare one by one :(







windows-10 microsoft-excel regex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 9 at 15:16









Just MeJust Me

1819




1819













  • Do you really have the same menu hardcoded in 2000 files? Why don't you have an unique include file?

    – Toto
    Feb 9 at 15:44











  • because I tested a wrong regex formula, and some elements changed :)

    – Just Me
    Feb 9 at 16:21



















  • Do you really have the same menu hardcoded in 2000 files? Why don't you have an unique include file?

    – Toto
    Feb 9 at 15:44











  • because I tested a wrong regex formula, and some elements changed :)

    – Just Me
    Feb 9 at 16:21

















Do you really have the same menu hardcoded in 2000 files? Why don't you have an unique include file?

– Toto
Feb 9 at 15:44





Do you really have the same menu hardcoded in 2000 files? Why don't you have an unique include file?

– Toto
Feb 9 at 15:44













because I tested a wrong regex formula, and some elements changed :)

– Just Me
Feb 9 at 16:21





because I tested a wrong regex formula, and some elements changed :)

– Just Me
Feb 9 at 16:21










2 Answers
2






active

oldest

votes


















1














Processing 2000 files manually will be impractical, so I searched for methods to do it automatically and found this site that claims to merge several excel files into one. I tried and could merge 2 files, that I then downloaded to my box. so I think they can do it.



http://www.docsoso.com/excel/combine-excel.aspx



No guarantee from my side. I googled to reach that and tried.



upload your 2000 excel files (you can upload many files in one go) to the site and get a single excel file. If the site doesn't allow so many files in one go, at least merge as many files as the site allows, so that you are left with 5 or 10 files that are still manageable manually.



once, a single file has been created, the links as you give above should be in A column.



Open the file and select all data in A column and sort



Select all data in A column, go to Menu - Data - click on Remove Duplicates.



It will remove all duplicate entries, meaning the entries from different files that had same article number.



You have only those lines left that have different number of articles.






share|improve this answer































    0














    I find the answer with regex. To verify the formula below, please compare those 2 menu on my basic post. This regex will select all lines from the second menu which does not have the same numbers as in the first menu.



    SEARCH:



    s+<li><a href=".*.html" title=".*">.* (?:(?!b(25|23|24|5|14|14|36)b).)*</a></li>$






    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%2f1403895%2fregex-or-excel-compare-multiple-lines-rows-and-find-different-numbers-from-pare%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









      1














      Processing 2000 files manually will be impractical, so I searched for methods to do it automatically and found this site that claims to merge several excel files into one. I tried and could merge 2 files, that I then downloaded to my box. so I think they can do it.



      http://www.docsoso.com/excel/combine-excel.aspx



      No guarantee from my side. I googled to reach that and tried.



      upload your 2000 excel files (you can upload many files in one go) to the site and get a single excel file. If the site doesn't allow so many files in one go, at least merge as many files as the site allows, so that you are left with 5 or 10 files that are still manageable manually.



      once, a single file has been created, the links as you give above should be in A column.



      Open the file and select all data in A column and sort



      Select all data in A column, go to Menu - Data - click on Remove Duplicates.



      It will remove all duplicate entries, meaning the entries from different files that had same article number.



      You have only those lines left that have different number of articles.






      share|improve this answer




























        1














        Processing 2000 files manually will be impractical, so I searched for methods to do it automatically and found this site that claims to merge several excel files into one. I tried and could merge 2 files, that I then downloaded to my box. so I think they can do it.



        http://www.docsoso.com/excel/combine-excel.aspx



        No guarantee from my side. I googled to reach that and tried.



        upload your 2000 excel files (you can upload many files in one go) to the site and get a single excel file. If the site doesn't allow so many files in one go, at least merge as many files as the site allows, so that you are left with 5 or 10 files that are still manageable manually.



        once, a single file has been created, the links as you give above should be in A column.



        Open the file and select all data in A column and sort



        Select all data in A column, go to Menu - Data - click on Remove Duplicates.



        It will remove all duplicate entries, meaning the entries from different files that had same article number.



        You have only those lines left that have different number of articles.






        share|improve this answer


























          1












          1








          1







          Processing 2000 files manually will be impractical, so I searched for methods to do it automatically and found this site that claims to merge several excel files into one. I tried and could merge 2 files, that I then downloaded to my box. so I think they can do it.



          http://www.docsoso.com/excel/combine-excel.aspx



          No guarantee from my side. I googled to reach that and tried.



          upload your 2000 excel files (you can upload many files in one go) to the site and get a single excel file. If the site doesn't allow so many files in one go, at least merge as many files as the site allows, so that you are left with 5 or 10 files that are still manageable manually.



          once, a single file has been created, the links as you give above should be in A column.



          Open the file and select all data in A column and sort



          Select all data in A column, go to Menu - Data - click on Remove Duplicates.



          It will remove all duplicate entries, meaning the entries from different files that had same article number.



          You have only those lines left that have different number of articles.






          share|improve this answer













          Processing 2000 files manually will be impractical, so I searched for methods to do it automatically and found this site that claims to merge several excel files into one. I tried and could merge 2 files, that I then downloaded to my box. so I think they can do it.



          http://www.docsoso.com/excel/combine-excel.aspx



          No guarantee from my side. I googled to reach that and tried.



          upload your 2000 excel files (you can upload many files in one go) to the site and get a single excel file. If the site doesn't allow so many files in one go, at least merge as many files as the site allows, so that you are left with 5 or 10 files that are still manageable manually.



          once, a single file has been created, the links as you give above should be in A column.



          Open the file and select all data in A column and sort



          Select all data in A column, go to Menu - Data - click on Remove Duplicates.



          It will remove all duplicate entries, meaning the entries from different files that had same article number.



          You have only those lines left that have different number of articles.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 9 at 17:19









          VSRawatVSRawat

          15512




          15512

























              0














              I find the answer with regex. To verify the formula below, please compare those 2 menu on my basic post. This regex will select all lines from the second menu which does not have the same numbers as in the first menu.



              SEARCH:



              s+<li><a href=".*.html" title=".*">.* (?:(?!b(25|23|24|5|14|14|36)b).)*</a></li>$






              share|improve this answer






























                0














                I find the answer with regex. To verify the formula below, please compare those 2 menu on my basic post. This regex will select all lines from the second menu which does not have the same numbers as in the first menu.



                SEARCH:



                s+<li><a href=".*.html" title=".*">.* (?:(?!b(25|23|24|5|14|14|36)b).)*</a></li>$






                share|improve this answer




























                  0












                  0








                  0







                  I find the answer with regex. To verify the formula below, please compare those 2 menu on my basic post. This regex will select all lines from the second menu which does not have the same numbers as in the first menu.



                  SEARCH:



                  s+<li><a href=".*.html" title=".*">.* (?:(?!b(25|23|24|5|14|14|36)b).)*</a></li>$






                  share|improve this answer















                  I find the answer with regex. To verify the formula below, please compare those 2 menu on my basic post. This regex will select all lines from the second menu which does not have the same numbers as in the first menu.



                  SEARCH:



                  s+<li><a href=".*.html" title=".*">.* (?:(?!b(25|23|24|5|14|14|36)b).)*</a></li>$







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Feb 22 at 9:03

























                  answered Feb 16 at 7:43









                  Just MeJust Me

                  1819




                  1819






























                      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%2f1403895%2fregex-or-excel-compare-multiple-lines-rows-and-find-different-numbers-from-pare%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

                      How to make a Squid Proxy server?

                      Is this a new Fibonacci Identity?

                      19世紀