That screenshot looks like a newline character (or is it a linefeed?) as
shown by an editor that was expecting a more Windows-ly standard line
ending. Other editors (like EditPad) would probably show each phone
number on its own line.
Anyway, you can use cf's "asc()" method to find the actual value of the
Nth character (the one that shows up as a box) and then you'll know what
delimiter to use with the list functions. (I bet the character is 10 or
13, so you could try to set a delimiter of chr(10) or chr(13) and see
what happens.)
Once you know the delimited you can use a list function like <cfloop
list=".." delimiter=".."> or ListToArray(list, delimiter) to convert
your file content to individual lines. (You have lots of options... The
key is figuring our what delimiter to use.)
Thanks
Mark
-----Original Message-----
From: cfcom [mailto:[email protected]]
Sent: Tuesday, May 19, 2009 1:23 PM
To: cf-talk
Subject: phone formating string and removing hidden characters
Hi,
I have a text file of 100,000 plus phone numbers that I need to change
formatting and export to a clean list. There is an unusual hidden
character that doesn't appear when pasting. Here is a screen shot
http://www.aceligent.com/post/hidden.html
The list is compiled in this manner, 'X' is supplemented for where the
hidden character is:
212,2000876x212,2002686x212,2005799x212,2007697x212,2010062x212,2010087x
212,
2010112x212,2010192x212,2010237x212,2010306x212,2010326x212,2010710x212,
2010
714x212,2010740x212,2010754x212,2010800x212,2010978x212,2011063x212,2011
065x
I need to process the list as a batch. How would I adapt this to clean
and count a 10 number sequence; add a coma; and repeat on new line? Then
export as a text file.
<cfset form.phone = "#form.phoneinput#"> <cfset cleanPhone =
ReReplace(form.phone, "[^0-9]", "", "ALL")>
<cfoutput>#cleanPhone#</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322636
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4