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 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 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:
> >>
> >>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.
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> 
> 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217974
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


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 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:
>>
>>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.
>>
>>
>> 
>>
> 
> 
> 
> 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217961
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


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:
>
>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.
>
>
>  
>


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217957
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


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 
___
Some days you are the dog,
Some days you are the tree.


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217872
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


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 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 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 can't just search for that.  I know I could do several 
> finds on the different resolutions, but I also know there's got to be a nifty 
> way with a RegEx to do it.  Anyone want to take a stab at it?  
> 
> Thanks,
> 
> Dave
> 
> **
> The information contained in this message, including attachments, may contain 
> privileged or confidential information that is intended to be delivered only 
> to the 
> person identified above. If you are not the intended recipient, or the person 
> responsible for delivering this message to the intended recipient, ALLTEL 
> requests 
> that you immediately notify the sender and asks that you do not read the 
> message or its 
> attachments, and that you delete them without copying or sending them to 
> anyone else. 
> 
> 
> 



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217864
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


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 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 can't just search for that.  I know I could do several 
> finds on the different resolutions, but I also know there's got to be a nifty 
> way with a RegEx to do it.  Anyone want to take a stab at it?  
> 
> Thanks,
> 
> Dave
> 
> **
> The information contained in this message, including attachments, may contain 
> privileged or confidential information that is intended to be delivered only 
> to the 
> person identified above. If you are not the intended recipient, or the person 
> responsible for delivering this message to the intended recipient, ALLTEL 
> requests 
> that you immediately notify the sender and asks that you do not read the 
> message or its 
> attachments, and that you delete them without copying or sending them to 
> anyone else. 
> 
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217862
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54