Hello Guys,
My REGEX skills are pretty horrible. I'm looking for a way to get the file
extension from a string, examples of the strings are:
Somthing.gif
Thisone.jpg
Ooh.mp3
Nice.fla
What's the best way to achieve this? Effectively I want everything to the
right of the dot.
You don't need Regex for that. Just use ListLast(filename, .)...
Since it can happen that your filename looks like this:
thisone.version.1.jpg
So ListLast() will do the trick.
Greetings / Grüsse
Gert Franz
Customer Care
Railo Technologies GmbH
[EMAIL PROTECTED]
www.railo.ch
Join our Mailing
You could just use ListFirst/ListLast?
i.e. cfset ext = ListLast(filename, '.')
-Original Message-
From: Robert Rawlins - Think Blue
[mailto:[EMAIL PROTECTED]
Sent: 19 June 2007 10:33
To: CF-Talk
Subject: REGEX File Extention
Hello Guys,
My REGEX skills are pretty horrible. I'm
Thanks guys,
List last worked a charm, why didnt I think of that ... DOH!
Rob
-Original Message-
From: Gert Franz [mailto:[EMAIL PROTECTED]
Sent: 19 June 2007 10:43
To: CF-Talk
Subject: Re: REGEX File Extention
You don't need Regex for that. Just use ListLast(filename, .)...
Since
#listlast(str, .)#
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Robert Rawlins - Think Blue
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 19, 2007 5:33 AM
To: CF-Talk
Subject: REGEX File Extention
Hello Guys,
My REGEX skills
5 matches
Mail list logo