Glad to help out. 

-----Original Message-----
From: Chris Martin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 30, 2007 11:03 AM
To: CF-Talk
Subject: Re: listQualify and multiple spaces

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



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287466
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to