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