2021年1月3日星期日

Detect existence each line of one list at the end of each line of another list

I have two lists. How to check whether each line of list_1 exists at the end of each line of list_2?

List_1:

.google.com  .yahoo.com  .bing.com  

List_2:

asd.google.com //valid  google.com.site.com //invalid  qwe.yahoo.com.au //invalid  xyz.bing.com //valid  

Expected output:

asd.google.com  xyz.bing.com  
https://stackoverflow.com/questions/65556391/detect-existence-each-line-of-one-list-at-the-end-of-each-line-of-another-list January 04, 2021 at 08:35AM

没有评论:

发表评论