ColdFusion REGEX - to determine the file's extension
I'm looking for a REGEX to obtain a files extension.
Given examples like:
modocument.doc
modocument.docx
dasddsa.pdf
kdsksdklsadklasdklads.png
ads123.jpg
I need a REGEX that provides the 3-4 char extension, but isn't fooled 开发者_开发技巧by things like:
asdadsasdads.jpg.png
And only gets PNG as seen above.
I think ListLast would do a better job for you:
<cfset FileExt=ListLast(YourFilename,".")>
精彩评论