[windows2000] Re: OT: Programming question

  • From: "Rick Fogarty" <rick@xxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 13 Nov 2003 13:21:13 -0500

Sort of... That's what the parse routine was for.  To make matters worse,
one can never assume that the names will always have a first, mi, last
suffix...
 
So with that - it could be
John Jones
John R. Jones
John Richard Jones
John Richard Jones III
 
And worse yet
 
John Richard De La Hoya-Jones III...

Get the picture...

-----Original Message-----
From: windows2000-bounce@xxxxxxxxxxxxx
[mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Saurer, John B.
Sent: Thursday, November 13, 2003 12:15 PM
To: 'windows2000@xxxxxxxxxxxxx'
Subject: [windows2000] Re: OT: Programming question


Not familiar with Delphi. Can it perform a character search such as charAt(
) and find the second occurance of a space using a loop? Then select
everythig from there to the end of line.

-----Original Message-----
From: Rick Fogarty [mailto:rick@xxxxxxxxxxxxx]
Sent: Thursday, November 13, 2003 10:04 AM
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] Re: OT: Programming question


No, I'm using Borland's Delphi to do this....It structured in a while
NOT(EOF) loop and then parses per line....

-----Original Message-----
From: windows2000-bounce@xxxxxxxxxxxxx
[mailto:windows2000-bounce@xxxxxxxxxxxxx] On Behalf Of Saurer, John B.
Sent: Thursday, November 13, 2003 9:51 AM
To: 'windows2000@xxxxxxxxxxxxx'
Subject: [windows2000] Re: OT: Programming question



Are you using the command line 'For' command? If so, something like this may
work: 

FOR /F "eol=; tokens=1,2,3-5 delims= , " %i in (myfile.txt) do @echo %i %j
%k 

From the help files: 

        tokens=x,y,m-n  - specifies which tokens from each line are to 
                          be passed to the for body for each iteration. 
                          This will cause additional variable names to 
                          be allocated.  The m-n form is a range, 
                          specifying the mth through the nth tokens. 

HTH 
John 

-----Original Message----- 
From: Costanzo, Ray [mailto:rcostanzo@xxxxxxxxxxx] 
Sent: Thursday, November 13, 2003 9:38 AM 
To: windows2000@xxxxxxxxxxxxx 
Subject: [windows2000] Re: OT: Programming question 


This is another one of those situations, so it sounds, that there isn't 
a 100% method.  What if your file is: 

Jo Ann Smith 
Jose Los Santos 

Jo Ann is the first person's first name, Los Santos is the second 
person's last name.  There is no way to distinguish this, unless you 
have the ability to think.  So, while you and I can distinguish it as 
thinkers, the computer cannot.  Is it possibly to have your source file 
come in a different way?  Like, with comma delimiting between first and 
last names or some other way of distinguishing things? 

Ray at work 

-----Original Message----- 
From: Rick Fogarty [mailto:rick@xxxxxxxxxxxxx] 

Some time ago I presented a question concerning parsing names in a data 
file.  I've got it working perfectly except for the following: 

Currently, the parsing routine uses delimiters (spaces, commas etc) to 
determine what separates the values (such as first name, middle name 
etc.) 

So, John L. Jones Jr  is pretty simple.  I'm having problems with names 
like this.... 

Juan Lopez De Los Santos 

The Juan and Lopez are fine, however, it's reading the De Los Santos as 
three separate entities as its programmed to do... I'm just wondering if 
there might be a better way to do this so I can get De Los Santos into 
the last name field. 


****************************************************************************
****************************** 
The information contained in this e-mail message is intended only for the
personal and confidential use 
of the recipient(s) named above.  Distribution, publication, or
retransmission of this message is strictly 
prohibited.  This message may be a bank to client communication and as such
is priviliged and confidential.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the 
intended recipient, you are hereby notified that you have received this
document in error and that any 
review, dissemination, distribution, or copying of this message is strictly
prohibited.  If you have received 
this communication in error, please notify us immediately by e-mail, and
delete the original message. 

The sender of this e-mail specifically "opts-out" of the Electronic
Signatures and Global and National 
Commerce Act (E-Sign) and any and all similar state and federal acts.
Accordingly, but without limitation, 
any and all documents, contracts, and ageements must contain a handwritten
signature of the sender to 
be legal, valid, and enforceable. 
****************************************************************************
****************************** 

******************************************************** 
This Weeks Sponsor Pearl Software 
Internet Monitoring, Filtering, and Control Solutions 
Enabling User & Group Level Oversight & Access Policies 
Fully Functional in a Thick or Thin Client Environment 
http://www.pearlsw.com 
********************************************************** 
To Unsubscribe, set digest or vacation 
mode or view archives use the below link. 

http://thethin.net/win2000list.cfm 

This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received this email in error, please notify the sender by reply email, do
not disclose this email to others, and delete this email from your system.
Please note that any views or opinions presented in this email are solely
those of the author and do not necessarily represent those of Winston
Industries. Finally, Winston Industries makes every effort to ensure a virus
free environment. However the recipient should check this email and any
attachments for the presence of viruses. Winston Industries accepts no
liability for any damage caused by any virus transmitted by this email.
Winston Industries, LLC, 2345 Carton Dr., Louisville, KY 40299


This message is confidential. It may also be privileged or otherwise
protected by work product immunity or other legal rules. If you have
received this email in error, please notify the sender by reply email, do
not disclose this email to others, and delete this email from your system.
Please note that any views or opinions presented in this email are solely
those of the author and do not necessarily represent those of Winston
Industries. Finally, Winston Industries makes every effort to ensure a virus
free environment. However the recipient should check this email and any
attachments for the presence of viruses. Winston Industries accepts no
liability for any damage caused by any virus transmitted by this email.
Winston Industries, LLC, 2345 Carton Dr., Louisville, KY 40299


Other related posts: