in reply to Re^3: Getting data from second file, based on first files contents;
in thread UPDATED - Getting data from second file, based on first files contents;

yeah it SHOULD match 'string 4' (on all occurences in file2) IF it contains any lines from file1.txt. if you put '123 string 4' inside of file 2, then it should take '123' from file one, and match the same '123' in file2. then you get the value directly to the right of the match (in file2) and compare it with the whole of file2, if the value to the right of '123' is 'string 4' then it will most def need to match if 123 is in file1, which obviously is. in essence you are trying to filter the file2.txt and you could say it could be like a database or something. anyway thanks for post replying :)
  • Comment on Re^4: Getting data from second file, based on first files contents;

Replies are listed 'Best First'.
Re^5: Getting data from second file, based on first files contents;
by kcott (Archbishop) on Oct 30, 2015 at 07:43 UTC

    I didn't go into details in my Update:, but what I considered to be the problem was that it DID match 'string 4'.

    I posted the original code with my update. That's probably what you want.

    — Ken