match element of a list based on another list in python where elements of one list is the substring of elements of another list
<pre><code>listA = ['abcd754_efgh_20160110_165623.frf', 'abcd754_efghijk_20160110_162419.frf', 'abcd755_mno_20160110_165287.frf', 'abcd755_mnopqr_20160110_164562.frf'  ]
listB = ['abcd754_efgh', 'abcd754_efghijk_', 'abcd755_mno_', 'abcd755_mnopqr_']
</code></pre>

<p>I have list A and list B. List A may sometimes have one or 2 elements missing. Based on that I need to create list C with elements in list B by maintaining the same order.</p>

<p>I have been unable to find a solution.</p>