Re: More RegExp help...

2005-09-12 Thread Scott Stroz
Good point...then I might consider this ListFirst(ListFirst(fileName,"."),"_") Again, this is assuming teh format of th efile name will not change.. On 9/12/05, Ben Doom <[EMAIL PROTECTED]> wrote: > > Except he also needs to remove the "_640x640" part. However, you could > do the same thing wit

Re: More RegExp help...

2005-09-12 Thread Ben Doom
Except he also needs to remove the "_640x640" part. However, you could do the same thing with underscores instead of periods. --Ben Jann E. VanOver wrote: > And if the filename COULD contain other periods: > listDeleteAt(filename,listLen(filename,"."),".") > > which says, delete the last list

Re: More RegExp help...

2005-09-12 Thread Jann E. VanOver
And if the filename COULD contain other periods: listDeleteAt(filename,listLen(filename,"."),".") which says, delete the last list item using "." as list delimiter Scott Stroz wrote: >I love RegEx, and use them frequently. However, they are not always my first >choice. I would actaully use: > >

Re: More RegExp help...

2005-09-10 Thread Scott Stroz
I love RegEx, and use them frequently. However, they are not always my first choice. I would actaully use: ListFirst(fileName,".") Assuming there are no periods in the file name. This may actually be a bit quicker since you don't use the Reg Ex engine. -- Scott Stroz Boyzoid.com

RE: More RegExp help...

2005-09-09 Thread Dave.Phillips
Ben, That's it. Makes pefect sense now. Thanks! Dave -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Friday, September 09, 2005 5:17 PM To: CF-Talk Subject: Re: More RegExp help... rereplace(string, "_[0-9]+x[0-9]+\.png", ""); If the pi

Re: More RegExp help...

2005-09-09 Thread Ben Doom
rereplace(string, "_[0-9]+x[0-9]+\.png", ""); If the pixel size (I assume that's what the numbers are) is always a square, you might use backreferencing to make it a bit pickier, but it probably isn't necessary. Assume the usual caveats. --Ben [EMAIL PROTECTED] wrote: > Hey folks, > > I have

More RegExp help...

2005-09-09 Thread Dave.Phillips
Hey folks, I have a regular expression I need for the following: I have filenames that have the following appended to them: filename_100x100.png filename_640x480.png filename_86x86.png and so on I need to extract JUST the filename. The kicker is, the filename MAY include underscores, so I