RE: String manipulation

2008-09-08 Thread Adrian Lynch
cfdirectory action=READ directory=path-to-your-directory name=dir cfdump var=#dir# Adrian www.adrianlynch.co.uk -Original Message- From: Cherrio [mailto:[EMAIL PROTECTED] Sent: 08 September 2008 08:54 To: CF-Talk Subject: String manipulation hi, am struggling with string manipilation!

Re: String manipulation

2008-09-08 Thread s. isaac dealey
cfdirectory action=READ directory=path-to-your-directory name=dir cfdump var=#dir# I'm going to add to adrian's code here: cfdirectory action=read name=dir filter=#nameoffile#.* directory=#directory# / The filter attribute of nameoffile.* will return all the files in that directory that

RE: String Manipulation Fun

2008-02-05 Thread Adrian Lynch
Do a ListLen(str, $) to see if the second element is present first. Adrian http://www.adrianlynch.co.uk/ -Original Message- From: Che Vilnonis Sent: 05 February 2008 20:59 To: CF-Talk Subject: String Manipulation Fun Take the following xml string value: 1969 Chevrolet Camaro -

RE: String Manipulation Fun

2008-02-05 Thread Kevin Aebig
Why not just use something like: cfset parsed = listlast(theArray[i].description.xmlText, ) cfif Len(parsed) GT 1 cfset amount = Right(parsed, Len(parsed)-1 cfelse cfset amount = 0 /cfif Untested... be warned. The only reason I left the dollar sign was to make sure a result came

RE: String Manipulation Fun

2008-02-05 Thread Brad Wood
There's probably a better way of doing this though... There is-- but I think it involves atomic data. :) ~Brad ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

RE: String Manipulation Fun

2008-02-05 Thread Che Vilnonis
Thanks. Did the trick... -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 05, 2008 4:06 PM To: CF-Talk Subject: RE: String Manipulation Fun Do a ListLen(str, $) to see if the second element is present first. Adrian http://www.adrianlynch.co.uk

RE: String Manipulation Fun

2008-02-05 Thread Bobby Hartsfield
It seems to me, as a list, that your delimiter is a hyphen, not a dollar symbol trim(listlast(theXMLdata, '-')) or if you don't want the dollar symbol... replace(trim(listlast(theXMLdata, '-')), '$', '') or a regex to grab everything after the $ (if you can guarantee no other dollar symbols)

RE: String Manipulation: get filename out of path

2006-07-26 Thread Sixten Otto
From: [EMAIL PROTECTED] I have this string, C:\CFusionMX7\wwwroot\Inherent\mich_state_bar\PDFS\userguide.pdf I want to parse out the name of the pdf. How do I do this? cfset FileName = GetFileFromPath(C:\CFusionMX7\wwwroot\Inherent\mich_state_bar\PDFS\userguid e.pdf) Sixten

RE: String Manipulation: get filename out of path

2006-07-26 Thread Josh Adams
Use the GetFileFromPath() function. There are a very large number of helpful CFML functions built right into the main CFML application servers--as soon as you can find the time, read through them a bit. Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent:

RE: String Manipulation: get filename out of path

2006-07-26 Thread Brad Wood
Getfilefrompath() Extracts the filename from a fully specified path. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 2:16 PM To: CF-Talk Subject: String Manipulation: get filename out of path I have this string,

Re: String Manipulation: get filename out of path

2006-07-26 Thread M
We use: #listlast(cgi.SCRIPT_NAME,'/')# ? On 7/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have this string, C:\CFusionMX7\wwwroot\Inherent\mich_state_bar\PDFS\userguide.pdf I want to parse out the name of the pdf. How do I do this? D

Re: String Manipulation: get filename out of path

2006-07-26 Thread Charlie Griefer
i was going to say listLast() as well...but getFileFromPath() (as suggested by everyone else so far) sounds like the better option. Either will work, but if I'm looking at my code later and see a getFileFromPath(), I'm going to know exactly what that snippet of code is doing. On 7/26/06, M [EMAIL

Re: String Manipulation: get filename out of path

2006-07-26 Thread Joseph Lamoree
On 26 Jul 2006, at 12:34, Charlie Griefer wrote: i was going to say listLast() as well...but getFileFromPath() (as suggested by everyone else so far) sounds like the better option. I assume that getFileFromPath() uses System.getProperty (file.separator) to parse the string, which would be

Re: String Manipulation: get filename out of path

2006-07-26 Thread Rick Root
Josh Adams wrote: Use the GetFileFromPath() function. There are a very large number of helpful CFML functions built right into the main CFML application servers--as soon as you can find the time, read through them a bit. I second that motion! I wrote a custom tag back in the CF 4 days to

Re: String Manipulation troubles

2002-06-26 Thread Clint Tredway
First off,trim your var in the if statement and then change the IS to eq. I have had this problem before and by always trimming my vars and using eq instead of is, I have had far less problems like this. HTH Clint -- Original Message -- from: Brian

Re: String Manipulation troubles

2002-06-26 Thread Jerry Johnson
Just to make sure it was an email-only typo You did not close the cfset tag with a Jerry Johnson [EMAIL PROTECTED] 06/26/02 11:09AM First off,trim your var in the if statement and then change the IS to eq. I have had this problem before and by always trimming my vars and using eq instead

RE: String Manipulation troubles

2002-06-26 Thread Adrian Lynch
It works for me Ade -Original Message- From: Brian Scandale [mailto:[EMAIL PROTECTED]] Sent: 26 June 2002 08:50 To: CF-Talk Subject: String Manipulation troubles Why doesn't this cfif statement catch the ] character? Or a better question is How do i branch on that character...

Re: String Manipulation troubles

2002-06-26 Thread Brian Scandale
Tried it Clint, see below... It does NOT test True for the Square Bracket. Does this have something to do with Regular Expressions? What's the proper way to test for the ] character? cfset temp = ] cfoutputbrtemp = #temp#br/cfoutput cfif trim(temp) EQ ] cfoutputbrtemp = #temp#br/cfoutput Yep It

Re: String Manipulation troubles

2002-06-26 Thread Brian Scandale
Right... an email typo indeed ;-( At 09:01 AM 6/26/02, you wrote: Just to make sure it was an email-only typo You did not close the cfset tag with a Jerry Johnson [EMAIL PROTECTED] 06/26/02 11:09AM First off,trim your var in the if statement and then change the IS to eq. I have had this

RE: String Manipulation troubles

2002-06-26 Thread Brian Scandale
Sorry All SOE Stupid Operator Error: It works... I just can't read. That's what I get for 2am morning sessions. Brian At 09:05 AM 6/26/02, you wrote: It works for me Ade -Original Message- From: Brian Scandale [mailto:[EMAIL PROTECTED]] Sent: 26 June 2002 08:50 To: CF-Talk

Re: String Manipulation troubles

2002-06-26 Thread Justin Scott
Tredway [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 11:09 AM Subject: Re: String Manipulation troubles First off,trim your var in the if statement and then change the IS to eq. I have had this problem before and by always trimming my vars and using eq instead

Re: String Manipulation help needed

2002-04-23 Thread Dave Hannum
Try this, ListFirst(http://www.foobar.com/images/screwy.gif;, /) Dave - Original Message - From: Tim Claremont [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, April 23, 2002 2:59 PM Subject: String Manipulation help needed I have the following string:

RE: String Manipulation help needed

2002-04-23 Thread Ryan Pieszak
Is it just for this string? If so...#Left(string,21)# ...should do it. If for any url (return everything before the third /): then...#Left(sting,Left(/,string,8))# ...should do it. Ryan -Original Message- From: Tim Claremont [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: String Manipulation help needed

2002-04-23 Thread Raymond Camden
Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Dave Hannum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:14 PM To: CF-Talk Subject: Re: String

RE: String Manipulation help needed

2002-04-23 Thread Carlisle, Eric
cfset url = http://www.foobar.com/images/screwy.gif; cfset myURL = listGetAt(url,1,'/') // listGetAt(url,2,'/') cfoutput#myURL#/cfoutput This code will do it. You can use the / as list delimiters, in which you're just grabbing the first two items in the list into a variable. Keep in mind

RE: String Manipulation help needed

2002-04-23 Thread Matthew R. Small
Or you could just use the CGI structure to grab info about the host name. I think the one you want is cgi.http_host. - Matt Small -Original Message- From: Dave Hannum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:14 PM To: CF-Talk Subject: Re: String Manipulation help

RE: String Manipulation help needed

2002-04-23 Thread Tim Claremont
Thanks Ray, that one did the trick. I won't even tell ya what I was trying to use... -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 3:21 PM To: CF-Talk Subject: RE: String Manipulation help needed No - that will return http

Re: String manipulation

2001-10-21 Thread James Sleeman
See GetDirectoryFromPath() and GetFileFromPath() At 04:16 AM 10/19/2001, you wrote: Hi, I would like to split the following line into two strings. The length or contents of the string can vary depending on the directory structure. Basically, I need to extract the directory path into one

Re: String manipulation

2001-10-21 Thread Justin Scott
. http://www.sceiron.com - Original Message - From: phumes1 [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, October 18, 2001 11:16 AM Subject: Re: String manipulation Hi, I would like to split the following line into two strings. The length or contents of the string

Re: String manipulation

2001-10-18 Thread phumes1
Hi, I would like to split the following line into two strings. The length or contents of the string can vary depending on the directory structure. Basically, I need to extract the directory path into one variable and the filename in another. Example: cfoutputURL.filename/cfoutput in my

Re: String manipulation

2001-09-21 Thread phumes1
Hi all, How can extract only the files with the following file extensions .96 from the string below and display the results as Output: 1.96,2.96 test1.txt,test2.txt,test3.txt,file1.96,test4.in,test5.dat,file2.96,file3.96,test6.dat,test5.doc,test5.jb

RE: String manipulation

2001-09-21 Thread Raymond Camden
Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 9:49 AM To: CF-Talk Subject: Re: String

RE: String manipulation

2001-09-21 Thread phumes1
, and a powerful ally it is. - Yoda -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 9:49 AM To: CF-Talk Subject: Re: String manipulation Hi all, How can extract only the files with the following file extensions .96

RE: String manipulation

2001-09-21 Thread phumes1
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 9:49 AM To: CF-Talk Subject: Re: String manipulation Hi all, How can extract only the files with the following file extensions .96 from the string below and display the results as Output

RE: String manipulation

2001-09-21 Thread Raymond Camden
: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 9:49 AM To: CF-Talk Subject: Re: String manipulation Hi all

RE: String manipulation

2000-12-13 Thread Chasmo
Martin wrote: ...so when in the loop how do I parse the current line.. eg..check the current line for certain characters, and if it passes the check I copy the string to a new entry in an array. Try this within the loop Steve suggested: cfif Find(idx, "some string") neq 0 cfset

Re: String manipulation

2000-12-12 Thread Joseph Thompson
It would be great if you could help me out..give me some sample code..names of functions taht I will need to do this..or all of the above..thanks :-) These are what I call the "string operator" functions. You will need most of these. http://cfhub.com/language/INDEX.CFM?Cat=String%20Operators

Re: String manipulation

2000-12-12 Thread Martin S
for the start, end params. Any ideas? From: "Joseph Thompson" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Re: String manipulation Date: Tue, 12 Dec 2000 17:05:39 -0800 It would be great if you could help me out..give me some sample code..names of

RE: String manipulation

2000-12-12 Thread Steve Bernard
nt_count#: #idx#br /CFOUTPUT /CFLOOP Steve -Original Message- From: Martin S [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 12, 2000 11:04 PM To: CF-Talk Subject: Re: String manipulation Thanks for that, I know most of the string functions...but how do I do a mid (string,start,end)

RE: String manipulation

2000-12-12 Thread Martin S
To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: RE: String manipulation Date: Wed, 13 Dec 2000 00:56:36 -0500 If you're trying to parse a text file line by line, it's typically done by looping over the file, as a list, using an appropriate EOL character(s) as the delimiter. In this cas