Re: How can I make this Replace() work?

2009-03-14 Thread John M Bliss
cfset renamedOriginal = Replace(Replace(cffile.serverFile, , , all), ', , all) cffile action=rename destination=#ExpandPath(renamedOriginal)# source=#ExpandPath(cffile.serverFile)# On Fri, Mar 13, 2009 at 7:26 PM, Rick Faircloth r...@whitestonemedia.comwrote: I have an uploaded file named:

RE: How can I make this Replace() work?

2009-03-14 Thread Rick Faircloth
your edge a bit...so...you're welcome! ;o) Rick -Original Message- From: Will Tomlinson [mailto:w...@wtomlinson.com] Sent: Saturday, March 14, 2009 2:36 AM To: cf-talk Subject: Re: How can I make this Replace() work? I have an uploaded file named: CIY '06 001.jpg (That's

RE: How can I make this Replace() work?

2009-03-14 Thread Rick Faircloth
can I make this Replace() work? cfset renamedOriginal = Replace(Replace(cffile.serverFile, , , all), ', , all) cffile action=rename destination=#ExpandPath(renamedOriginal)# source=#ExpandPath(cffile.serverFile)# On Fri, Mar 13, 2009 at 7:26 PM, Rick Faircloth r

How can I make this Replace() work?

2009-03-13 Thread Rick Faircloth
I have an uploaded file named: CIY '06 001.jpg (That's CIYspace'06space001.jpg) I want to change the name of that file to: CIY06001.jpg By running a replace or regex.replace() or something to remove all non-alphanumeric characters, except the . before the extension. I've tried a lot of

RE: How can I make this Replace() work?

2009-03-13 Thread Justin Scott
By running a replace or regex.replace() or something to remove all non-alphanumeric characters, You want to use the REReplace() function instead of the usual Replace() function, which does not support regular expressions. REReplace() does, however. -- Justin Scott | GravityFree Member of

Re: How can I make this Replace() work?

2009-03-13 Thread Peter Boughton
cfset renamedOriginal = regex.replace(cffile.serverFile, [^a-zA-Z0-9.], ) ColdFusion does not have a built in regex object, as you are attempting to use there. To perform a regex replace, you need to use rereplace(input,regex,replacement) Also, your regex does not match your description:

RE: How can I make this Replace() work?

2009-03-13 Thread Rick Faircloth
, I'm all ears. I'm just glad to finally have this code working! Thanks, again! Rick -Original Message- From: Peter Boughton [mailto:bought...@gmail.com] Sent: Friday, March 13, 2009 10:22 PM To: cf-talk Subject: Re: How can I make this Replace() work? cfset

Re: How can I make this Replace() work?

2009-03-13 Thread Will Tomlinson
I have an uploaded file named: CIY '06 001.jpg (That's CIYspace'06space001.jpg) I want to change the name of that file to: CIY06001.jpg Dunno if this is an option rick, but I usually use bobby h's trick of creating my own filename for the images. Then you don't need to worry about