<?xml version="1.0" encoding="windows-1252"?>
<node id="49115" title="Re: Code Smarter" created="2000-12-31 17:22:19" updated="2005-08-13 02:51:00">
<type id="11">
note</type>
<author id="49022">
salvadors</author>
<data>
<field name="doctext">
So, what's the best way to find of a string ends with a given substring?

&lt;p&gt;On another thread I posted example code for finding all your .mp3 files, and I used rindex, but I dawned on me later that that would also find false negatives like: "foo.mp3.gif"

&lt;p&gt;So what's the best replacement for &lt;code&gt;m/.mp3$/&lt;/code&gt;? 

&lt;p&gt;Tony</field>
<field name="root_node">
42374</field>
<field name="parent_node">
42374</field>
</data>
</node>
