On Tue, Feb 9, 2010 at 1:01 PM, Richmond Mathewson <
[email protected]> wrote:

> I have a series of image names for the type:
>
> f#.png
>
> where # can be a number anywhere between 1 and 6 figures long.
>
> what I need is to extract the number from the image name.
>
>
Try using a regular expression:

function extractImageNumber pName
   local tNumber

   if matchText(pName,"f(\d+)\.*", tNumber) is false then
      return empty
   end if

   return tNumber
end extractImageNumber

Jeff M.
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to