PERFECT! That worked out great...Thanks!
Andy Matthews wrote:
> That might be one of your problems. If you use multiple characters as
> delimiters, ColdFusion only sees "one" of them. I'd recommend using
> REReplaceNoCase to remove the additional spaces first, then insert an
> alternate delimiter in the correct spot. This will replace 2 or more spaces
> with a tilde:
>
> <cfset yourString = "LANCASTER MS BAND JAMES
> GUENGERMAN">
> <cfoutput>[#REReplaceNoCase(yourString,"[ ]{2,}","~","ALL")#]</cfoutput>
>
> -----Original Message-----
> From: Chris Martin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 30, 2007 10:27 AM
> To: CF-Talk
> Subject: Re: listQualify and multiple spaces
>
> Basically all I'm trying to is separate "LANCASTER MS BAND" from "JAMES
> GUENGERMAN" because they are two seperate items. But since they reside on
> the same line, simply performing adding a different delimiter (other than
> the single space) isn't going to give me what I want...it just
> create a different delimiter for the list. Here's what I've tried.
>
> The is formatted like this:
> LANCASTER MS
> BAND
> JAMES GUENGERMAN
>
> 1. <cfset theCustomer = #listFirst(line, "chr(32)chr(32)")#> 2. <cfset
> theCustomer = #listGetAt(line, 1, "chr(32)chr(32)")#>
>
> I only put 2 spaces as the delimiter because anything else is single spaced.
>
> Chris Martin
>
>
>
>
> Andy Matthews wrote:
>
>> What are you expecting to happen? Do you want to return multiple
>> indexes from those multiple spaces? Maybe you could find and replace
>> spaces with a tilde (~) or something, then use that as your new delimiter?
>>
>> -----Original Message-----
>> From: Chris Martin [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, August 30, 2007 9:38 AM
>> To: CF-Talk
>> Subject: listQualify and multiple spaces
>>
>> I'm trying to parse a .txt file using the built-in java reader and
>> have come across an issue where I need to qualify a list based on
>> multiple spaces on a line. For instance,
>>
>> LANCASTER MS BAND
>> JAMES GUENGERMAN
>>
>> The qualifier will be between "Band" and "James". There are over
>> 10,000 records that will be read in this method, so there is no set
>> number of spaces between the two strings.
>>
>> Any help is greatly appreciated!
>>
>>
>>
>>
>>
>>
>> Chris Martin
>>
>>
>>
>>
>>
>>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287462
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4