Hi Charlie
I trust the following will clear up any confusion
I have data from mobile devices being sent to my server
The listener captures the packet as a record in database table and the
content of the packet is stored in a column the database table. This table
become my raw data /
Thank Paul
I have it sorted
Its possibly not the cleanest way but it works
cfset imei_pos = reFindNoCase([0-9]{15}, raw)
cfset before_imei =left(raw,imei_pos)
cfset comma_count = listlen(before_imei)
cfset imei = ListGetAt(raw,comma_count,,)
Kind Regards
Claude Raiola
Hi
I have a csv data set with each record contains a set of comma separated
values
I am trying to write cf code to interrogate each record to find the value in
the set of comma seated values that meets a specific character set
In the examples below you can see the value 868487001009190
ListFindNoCase() ??
On Thu, Jul 4, 2013 at 2:35 PM, rai...@ozemail.com.au wrote:
Hi
** **
I have a csv data set with each record contains a set of comma separated
values
** **
I am trying to write cf code to interrogate each record to find the value
in the set of comma
Hi
I think you misunderstand I will not know what the values of the 15
character numbers are, that's the objective finding the 15 character numbers
to the ne able to determine what the actual number value is which will be
different for each record
Kind Regards
Claude Raiola
then you want a regex like
[0-9]{15}
it'll find a number set 15 numbers long.
Do I understand you better now?
reFindNoCase
should return
868487001009190
then if you want to know the position you could do a listFindNoCase
pseudo code
foundNumber = reFindNoCase([0-9]{15}, bigString)
position =
I understand you want to know the column in the record, then do a
ListToArray and loop though each element to look for the pattern, use
^[0-9]{15}$ to look for value that are exactly 15 chars.
Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au
I realise it is not - in your example but...
If the position of the number s always at the same position in the list;
You can use ListGetAt()
Otherwise you can loop through the list using the regex of the other posts
to find your match.
Lastly, depending on the length of the CSV, and the lists
Claude, you don't mention how you are reading the csv in, in the first
place. Are you using CFFILE or another function to read the entire file in,
and then trying to loop over it?
Have you instead tried using CFHTTP? Many don't know it but that has long
had the ability to read in a CSV and