May 12, 2008
For ColdFusion hosting try HostMySite.com. |
Home /
Groups /
ColdFusion Talk (CF-Talk)
How to get this part of this string
Can't seem to figure this one out...Rick Faircloth 03/25/08 06:31 P probably like this...Nathan Strutz 03/25/08 06:43 P You could do this in several different ways, here's one:Dominic Watson 03/25/08 06:48 P Thanks, guys!Rick Faircloth 03/25/08 07:17 P >>How would I select "falls_bridge"Claude Schneegans 03/27/08 01:39 A Can't seem to figure this one out... How would I select "falls_bridge" out of "falls_bridge_original.jpg"? It would also need to work to select "falls_bridge" our of "falls_bridge_original.jpeg" And it would need to be able to select "roanoke" out of "roanoke_original.jpg"... So, in other words, the only constant would be the "_original." part. It could be "How do I get everything to the left of "_original" in a string with an extension after "_original". Anyone? Thanks, Rick probably like this... #reReplace("falls_bridge_original.jpeg", "^(.+?)(_original)?\.\w+$", "\1")# -- nathan strutz http://www.dopefly.com/ On Tue, Mar 25, 2008 at 3:30 PM, Rick Faircloth <Rick@whitestonemedia.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- You could do this in several different ways, here's one: <cfset result = ReplaceNoCase(ListFirst(filename,'.'), '_original', '')> HTH Dominic -- Blog it up: http://fusion.dominicwatson.co.uk Thanks, guys! Rick ----- Excess quoted text cut - see Original Post for more ----- >>How would I select "falls_bridge" left(string, len(string) - len(listLast(string), "_") - 1) -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: piegeacon@internetique.com) Thanks.
|
Mailing Lists
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||