You know... a better solution than what I've got, which is
to only deal with as many as two periods in a filename, is needed.
The current solution leaves some gaps if a user decides to user several
periods as delimiters.  And stripping out the periods, except for the one
before the extension might cause name conflicts.

Todd... what would be the regex for deleting just the last period
in a filename plux the extension?

Rick



> -----Original Message-----
> From: Todd [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 07, 2007 12:08 PM
> To: CF-Talk
> Subject: Re: How do I get the characters after the last period in a string?
> 
> Regex example would be:
> 
> <cfset blah = "asdflasdfasdfasdf.jpg">
> <cfdump var="#rematchNoCase('^\w*',blah)#">
> 
> On Nov 7, 2007 11:57 AM, Todd <[EMAIL PROTECTED]> wrote:
> 
> >
> > Plenty of things to do here.
> > 1.) Use regular expression.
> > 2.) Treat the string as a list using the "." as a delimiter (e.g.: <cfset
> > name = listFirst(varname,'.')> )
> 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292861
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to