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
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? ;-)
>
~
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?
>
> 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
+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
>>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
>>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])
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
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, '.
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
>>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.
>> 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
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]>
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
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
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.
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.
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
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,
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
^ = 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
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?
>
> 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.
> >
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
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
;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
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
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
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
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
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
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,'.')> )
~
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
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
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
35 matches
Mail list logo