House of Fusion
Home of the ColdFusion Community
Hostmysite Dedicated Hosting

Search cf-talk

May 12, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31


For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

How to get this part of this string

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
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
Thanks, guys!
Rick Faircloth
03/25/08 07:17 P
>>How would I select "falls_bridge"
Claude Schneegans
03/27/08 01:39 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Faircloth
03/25/2008 06:31 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nathan Strutz
03/25/2008 06:43 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dominic Watson
03/25/2008 06:48 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude Schneegans
03/27/2008 01:39 AM

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


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists
Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition