<cfset result = listDeleteAt(listLen(sourceString, ".")) />

Regards
Dale Fraser

http://learncf.com


-----Original Message-----
From: Todd [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 8 November 2007 7:32 AM
To: CF-Talk
Subject: Re: How do I get the characters after the last period in a string?

<cfset blah = "asdflas.dfas.dfasdf.jpg">
<cfdump var="#rematch('[^\s]+(?=\.(jpg|gif|png))\.',blah)#">

On Nov 7, 2007 1:58 PM, Rick Faircloth <[EMAIL PROTECTED]> wrote:

> 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




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:292906
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to