From the list below I would like to detect the elements of the list (5 elements in the list below) that have a string ending by "0002". The problem is in the detection of the "end" of each string because some elements of the list have more than one string.
$1
[1] 1000262
$554
[1] 554000002 554000017 554000022 554000087 554000170 554000229 554000381 554000515
[9] 554000595 554000635 554000680
$653
[1] 653000002 653000033 653000126 653000400 653000712
$654
[1] 654000579
$655
[1] 655000620