RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Bobby Hartsfield
Sent: Wednesday, November 07, 2007 5:04 PM To: CF-Talk Subject: Re: How do I get the characters after the last period in a string? am i missing something here? if you're trying to get the file name (sans extension) and extension (sas filename) -of an uploaded file-... why not the cffile variab

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Todd
I offered him 2 choices. ListFirst() and Regex. I gave examples of each. What more am I supposed to do? On Nov 7, 2007 5:39 PM, Claude Schneegans <[EMAIL PROTECTED]> wrote: > >>Regex example would be: > > Hmmm, why make it simple when regExp could make it look more > complicated? ;-) > ~

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Dale Fraser
Or Regards Dale Fraser http://learncf.com -Original Message- From: Todd [mailto:[EMAIL PROTECTED] Sent: Thursday, 8 November 2007 7:39 AM To: CF-Talk Subject: Re: How do I get the characters after the last period in a string? Scratch the last, use this instead: On Nov 7, 2007

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
Re: How do I get the characters after the last period in a string? > > am i missing something here? if you're trying to get the file name > (sans extension) and extension (sas filename) -of an uploaded file-... > why not the cffile variables that i mentioned earlier (or h

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Adam Haskell
+1 On Nov 7, 2007 5:04 PM, Charlie Griefer <[EMAIL PROTECTED]> wrote: > am i missing something here? if you're trying to get the file name > (sans extension) and extension (sas filename) -of an uploaded file-... > why not the cffile variables that i mentioned earlier (or has my prior > messag

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Claude Schneegans
>>Todd... what would be the regex for deleting just the last period in a filename plux the extension? If you want to be that fussy, you should also take in account files with no extension at all. Personally, I rename the file using a UUID with no extension, then analyse the file to know exactl

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Claude Schneegans
>>Regex example would be: Hmmm, why make it simple when regExp could make it look more complicated? ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED])

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Dale Fraser
Regards Dale Fraser http://learncf.com -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Thursday, 8 November 2007 7:46 AM To: CF-Talk Subject: RE: How do I get the characters after the last period in a string? You're right... I should be using cffil

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
Thanks, Bobby... Rick > -Original Message- > From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 2:53 PM > To: CF-Talk > Subject: RE: How do I get the characters after the last period in a string? > > Listlast(filename, '.

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Dale Fraser
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? On Nov 7, 2007 1:58 PM, Rick Faircloth <[EMAIL PROTEC

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Claude Schneegans
>>Listlast(filename, '.') to get the extenstion or to get the file name if no extension... -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks.

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Claude Schneegans
>> want to return the characters in the name of a photo preceding the period. ListFirst() man, listFirst! ;-) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTE

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Charlie Griefer
am i missing something here? if you're trying to get the file name (sans extension) and extension (sas filename) -of an uploaded file-... why not the cffile variables that i mentioned earlier (or has my prior message not made it yet?) On Nov 7, 2007 11:53 AM, Bobby Hartsfield <[EMAIL PROTECTED]>

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
Thanks, Todd! Rick > -Original Message- > From: Todd [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 3:32 PM > To: CF-Talk > Subject: Re: How do I get the characters after the last period in a string? > > > > > On Nov 7, 2007 1:58 PM, Ri

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
You're right... I should be using cffile for renaming... > -Original Message- > From: Todd [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 1:58 PM > To: CF-Talk > Subject: Re: How do I get the characters after the last period in a string? > > Beca

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
ow do I get the characters after the last period in a string? > hi rick: > > a couple of things: > > 1) the 'file' scope has been deprecated in favor of 'cffile'. so you > should make an effort to reference cffile.serverfile instead of > file.serverfile.

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Todd
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.

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Bobby Hartsfield
Listlast(filename, '.') to get the extenstion And... ListDeleteAt(filename, listlen(filename, '.'), '.') to get everything except the extension (including the dot) It doesn't matter with either method whether there is 1 dot or 40. They will work as long as there is at least 1 dot present. How

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Todd
Scratch the last, use this instead: On Nov 7, 2007 3:31 PM, Todd <[EMAIL PROTECTED]> wrote: > > > > > 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,

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Charlie Griefer
On Nov 7, 2007 10:14 AM, Rick Faircloth <[EMAIL PROTECTED]> wrote: > Thanks everyone, for the help... > > Here's the final solution, if anyone's interested: > > accept="image/jpg, image/pjpg, image/jpeg, image/pjpeg, image/png" > nameconflict="makeunique"> > > > source="#rppo##file.serve

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Todd
^ = start of string \w = Word * probably isn't needed. This regex doesn't account for multiple "." characters, but that's not to say that you can't make it. \w will probably need changed to something else. I'm a hack at this, not an expert. :) Trying to get there. Regex cheat sheet: http://www

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Jerry Johnson
this will work for 1 or more, but will NOT work for none! (it will return an empty string) you should do a listLen(file,".") gt 0 test to make sure before you start. On Nov 7, 2007 1:21 PM, Rick Faircloth <[EMAIL PROTECTED]> wrote: > Jerry... > I'll modify my code to use: > #listdeleteat(file,lis

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
Re: How do I get the characters after the last period in a string? > > Regex example would be: > > > > > On Nov 7, 2007 11:57 AM, Todd <[EMAIL PROTECTED]> wrote: > > > > > Plenty of things to do here. > > 1.) Use regular expression. > >

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Todd
Because CFImage isn't supposed to be used as a file system manipulation? Even functions like fileMove() doesn't even have one. Only one that I'm aware that has a nameconflict attribute is CFFile action="upload." There's a reason why we have functions like fileExists(). On Nov 7, 2007 1:14 PM, Ri

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
Thanks, Todd... Can you explain the '^\w' part? 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? &g

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
;nameconflict" option. It seems it really needs one. Any reason why it wouldn't have one? Rick > -Original Message- > From: Web Specialist [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 12:13 PM > To: CF-Talk > Subject: Re: How do I get the characte

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
he less I ask these users to do, the better! ;o) Rick PS - I just can't get over how great it is to have some image functions! > -Original Message- > From: Jerry Johnson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 07, 2007 12:04 PM > To: CF-Talk > Subjec

RE: How do I get the characters after the last period in a string?

2007-11-07 Thread Jonathon Stierman
ListLast("dog.jpg",".") Jonathon -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 07, 2007 10:42 AM To: CF-Talk Subject: How do I get the characters after the last period in a string? This seems so simple, yet I couldn

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Eric Cobb
ListFirst('dog.jpg','.') Rick Faircloth wrote: > This seems so simple, yet I couldn't figure out the answer even after > going through the list and strings functions in the docs for CF 8. > > I want to return the characters in the name of a photo preceding the > period. > > i.e.. If the photo i

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Jerry Johnson
Use the list functions, with the period as the delimiter could there be more than one period? If so, you need to decide between two options (if not, then either will work) If you only want to remove the very last extension after the last period, If you only want the content before the first on

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Web Specialist
Cheers 2007/11/7, Todd <[EMAIL PROTECTED]>: > > Plenty of things to do here. > 1.) Use regular expression. > 2.) Treat the string as a list using the "." as a delimiter (e.g.: name = listFirst(varname,'.')> ) > > On Nov 7, 2007 11:41 AM, Rick Faircloth <[EMAIL PROTECTED]> wrote: > > > This seem

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Todd
Regex example would be: 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.: name = listFirst(varname,'.')> ) ~

How do I get the characters after the last period in a string?

2007-11-07 Thread Rick Faircloth
This seems so simple, yet I couldn't figure out the answer even after going through the list and strings functions in the docs for CF 8. I want to return the characters in the name of a photo preceding the period. i.e.. If the photo is named "dog.jpg", I want to strip out ".jpg" from the filename

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Todd
Plenty of things to do here. 1.) Use regular expression. 2.) Treat the string as a list using the "." as a delimiter (e.g.: ) On Nov 7, 2007 11:41 AM, Rick Faircloth <[EMAIL PROTECTED]> wrote: > This seems so simple, yet I couldn't figure out the answer even after > going through the list and st

Re: How do I get the characters after the last period in a string?

2007-11-07 Thread Barney Boisvert
listLast(myString, ".") cheers, barneyb On 11/7/07, Rick Faircloth <[EMAIL PROTECTED]> wrote: > This seems so simple, yet I couldn't figure out the answer even after > going through the list and strings functions in the docs for CF 8. > > I want to return the characters in the name of a photo pre