REGEX File Extention

2007-06-19 Thread Robert Rawlins - Think Blue
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.

Re: REGEX File Extention

2007-06-19 Thread Gert Franz
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

RE: REGEX File Extention

2007-06-19 Thread Andy McShane
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

RE: REGEX File Extention

2007-06-19 Thread Robert Rawlins - Think Blue
Thanks guys, List last worked a charm, why didn’t 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

RE: REGEX File Extention

2007-06-19 Thread Bobby Hartsfield
#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