Re: [NF] RegEx Help

2007-06-15 Thread Kenneth Kixmoeller/fh

On Jun 15, 2007, at 7:25 AM, Ted Roche wrote:

> a patchy, clumsy,
> awkward, hard-to-maintain or fragile fix

I'll buy that...

Ken "Kluge" Kixmoeller


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-15 Thread Frank Burcaw
Problem solved.  Instead of trying match on an exclusion, I'm doing a
match on what is allowed.  For this application we are trying to
minimize the amount of punctuation on mailing labels and we wanted a
nice and tidy grid view that is sortable by last name and company
name.  I agree thatbreaking the names into multiple fields is a good
idea, but in this case it would  generally slow down the heads-down
data entry process and use up screen space that could be used for
something else.  We are tracking the entity type (LLC, Individual,
Corporation, and Partnership) so we can also bound over to the entity
type to validate the data entry of names that could be either a person
or a company.  For fields in which it is a person, I can make sure
that the user follows the pattern.  Also, I thing regular expressions
are a bit easier than parsing the string ourselves.

Have a good weekend everyone,
Frank


On 6/15/07, Bill Arnold <[EMAIL PROTECTED]> wrote:
>
> Frank,
>
> I've solved this problem with a "matchcode builder" that parses the name
> field from right to left, skipping words in a developed list such as Jr,
> Sr, etc. etc. to isolate the last name, which is then copied into the
> matchcode field for dupe detection, sorting and presenting address lists
> in alphabetic order.
>
> For firm names, I require a flag so the matchcode builder process takes
> the 1st, rather then the last, name. The operator has to key this flag
> during entry or add it later.
>
> I've done this for a long time now, and am still happy with the
> solution, rather then even trying to require the operator to enter fixed
> fields. Another angle is that sometimes it's necessary to import address
> lists from other sources, which gets back to being able to handle names
> and addresses as they would be written on an envelope. Of course if the
> addresses being imported are structured some other way, then special
> handling to import is required, but I do prefer the natural way.
>
>
> Bill
>
>
>
> > > One of the problems is there are so many ways that the
> > string could be
> > > written depending on whether it referred to a couple,
> > individual, or
> > > company.  This mean you would need to write many Rx(s) to catch all
> > > the possibilities, and you still might not have an Rx that
> > is bullet
> > > proof. If you're using perl, Activestate has a doc on Rx
> > that might be
> > > helpful.
> >
> >
> > What I'm trying to accomplish is a way to nudge the user in
> > to entering name data consistently.
> >
> > Our preferred methods for people are listed below:
> >
> > BURCAW, FRANK
> > BURCAW, FRANK W
> > BURCAW, FRANK & STEPHANIE
> >
> > This will allow for better sorting in grid views.  When it's
> > time to print, then I'll rearrange them to a first name last
> > name layout.  No commas would indicate that it is a company name.
> >
> > So I was trying to build a regular expression that would
> > match the last name, first name pattern as long as a list of
> > words also did not exist.
> >
> > I'l still struggling with this and would appreciate any assistance.
> >
> > Best regards,
> >
> > Frank
> >
>
>
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


RE: [NF] RegEx Help

2007-06-15 Thread Bill Arnold

Frank,

I've solved this problem with a "matchcode builder" that parses the name
field from right to left, skipping words in a developed list such as Jr,
Sr, etc. etc. to isolate the last name, which is then copied into the
matchcode field for dupe detection, sorting and presenting address lists
in alphabetic order.

For firm names, I require a flag so the matchcode builder process takes
the 1st, rather then the last, name. The operator has to key this flag
during entry or add it later.

I've done this for a long time now, and am still happy with the
solution, rather then even trying to require the operator to enter fixed
fields. Another angle is that sometimes it's necessary to import address
lists from other sources, which gets back to being able to handle names
and addresses as they would be written on an envelope. Of course if the
addresses being imported are structured some other way, then special
handling to import is required, but I do prefer the natural way. 


Bill



> > One of the problems is there are so many ways that the 
> string could be 
> > written depending on whether it referred to a couple, 
> individual, or 
> > company.  This mean you would need to write many Rx(s) to catch all 
> > the possibilities, and you still might not have an Rx that 
> is bullet 
> > proof. If you're using perl, Activestate has a doc on Rx 
> that might be 
> > helpful.
> 
> 
> What I'm trying to accomplish is a way to nudge the user in 
> to entering name data consistently.
> 
> Our preferred methods for people are listed below:
> 
> BURCAW, FRANK
> BURCAW, FRANK W
> BURCAW, FRANK & STEPHANIE
> 
> This will allow for better sorting in grid views.  When it's 
> time to print, then I'll rearrange them to a first name last 
> name layout.  No commas would indicate that it is a company name.
> 
> So I was trying to build a regular expression that would 
> match the last name, first name pattern as long as a list of 
> words also did not exist.
> 
> I'l still struggling with this and would appreciate any assistance.
> 
> Best regards,
> 
> Frank
> 



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-15 Thread Richard Kaye
Not to make your life more difficult but a comma in a company name is 
pretty common so making the assumption that the presence of a comma is a 
delimiter between last name and first name is going to bite you. Ideally 
you would have a separate column to store the parts of a name as well as 
the company. It sounds like you're just storing the name in a single 
column. If you really want to nudge your user's, change the UI to make 
them enter parts separately, even if you're not storing them that way.

Frank Burcaw wrote:
> What I'm trying to accomplish is a way to nudge the user in to
> entering name data consistently.
>
> Our preferred methods for people are listed below:
>
> BURCAW, FRANK
> BURCAW, FRANK W
> BURCAW, FRANK & STEPHANIE
>
> This will allow for better sorting in grid views.  When it's time to
> print, then I'll rearrange them to a first name last name layout.  No
> commas would indicate that it is a company name.
>
> So I was trying to build a regular expression that would match the
> last name, first name pattern as long as a list of words also did not
> exist.
>
> I'l still struggling with this and would appreciate any assistance.
>
> Best regards,
>
> Fran

-- 
Richard Kaye
Vice President
Artfact/RFC Systems
Voice: 617.219.1038
Fax:  617.219.1001

For the fastest response time, please send your support
queries to:

Technical Support - [EMAIL PROTECTED]
Australian Support - [EMAIL PROTECTED]
Internet Support - [EMAIL PROTECTED]
All Other Requests - [EMAIL PROTECTED]

-
This message has been checked for viruses before sending.
-



___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-15 Thread Frank Burcaw
> One of the problems is there are so many ways that the string could be
> written depending on whether it referred to a couple, individual, or
> company.  This mean you would need to write many Rx(s) to catch all the
> possibilities, and you still might not have an Rx that is bullet proof.
> If you're using perl, Activestate has a doc on Rx that might be helpful.


What I'm trying to accomplish is a way to nudge the user in to
entering name data consistently.

Our preferred methods for people are listed below:

BURCAW, FRANK
BURCAW, FRANK W
BURCAW, FRANK & STEPHANIE

This will allow for better sorting in grid views.  When it's time to
print, then I'll rearrange them to a first name last name layout.  No
commas would indicate that it is a company name.

So I was trying to build a regular expression that would match the
last name, first name pattern as long as a list of words also did not
exist.

I'l still struggling with this and would appreciate any assistance.

Best regards,

Frank


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-15 Thread Ted Roche
On 6/15/07, Ted Roche <[EMAIL PROTECTED]> wrote:

To my ears, a "workaround" is a description of necessary work:
something a coder has to write, an implementation of a feature despite
what is offered by the BIOS, OS APIs or programming environment.

A kluge is a description of the resulting work: a patchy, clumsy,
awkward, hard-to-maintain or fragile fix might be a kluge;
compare-and-contrast with "righteous hack."

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-15 Thread Ted Roche
> That reminds me ... what is the difference between a workaround and a
> kludge ?

http://www.hacker-dictionary.com/terms/kluge

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-14 Thread Leland F. Jackson, CPA
One of the problems is there are so many ways that the string could be 
written depending on whether it referred to a couple, individual, or 
company.  This mean you would need to write many Rx(s) to catch all the 
possibilities, and you still might not have an Rx that is bullet proof.  
If you're using perl, Activestate has a doc on Rx that might be helpful.

http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/lib/Pod/perlrequick.html

or

http://tinyurl.com/3c9suw

Regards,

LelandJ


Frank Burcaw wrote:
> I'm about ready to throw in the towel.
>
> Let's say I have the strings "JONES, ROBERT" , "ROBERT JONES INC" ,
> and "JONES, ROBERT & JOAN"
>
> I'm  trying to use a regular expression to determine if the sting is
> an individual (or couple) or not so I came up with [\sA-Z]+,[\sA-Z&]+
>
> It  works pretty good, but I realized that the user could enter a
> comma before the word INC, LLC, CORP etc, like "ROBERT JONES, LLC".
>
> I certain that there is a way to do this, but after wasting several
> hours, I'm beginning to think that there isn't.
>
> Best regards,
>
> Frank
>
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-14 Thread Paul Newton
Chet Gardiner wrote:
> A workaround is susceptible to debugging?   :-)
>   
Not exactly.  If *I* do it, it's a workaround 
>
> Paul Newton wrote:
>   
>> Kenneth Kixmoeller/fh wrote:
>>   
>> 
>>> On Jun 14, 2007, at 3:34 PM, Frank Burcaw wrote:
>>>
>>>   
>>> 
>>>   
 It  works pretty good, but I realized that the user could enter a
 comma before the word INC, LLC, CORP etc, like "ROBERT JONES, LLC".
 
   
 
>>> Just a workaround, but why don't you take the comma out of the string  
>>> when it contains "INC, LLC, CORP etc," before you process it with  
>>> your regex statement?
>>>   
>>> 
>>>   
>> That reminds me ... what is the difference between a workaround and a 
>> kludge ?
>>
>>   
>> 
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-14 Thread Chet Gardiner
A workaround is susceptible to debugging?   :-)


Paul Newton wrote:
> Kenneth Kixmoeller/fh wrote:
>   
>> On Jun 14, 2007, at 3:34 PM, Frank Burcaw wrote:
>>
>>   
>> 
>>> It  works pretty good, but I realized that the user could enter a
>>> comma before the word INC, LLC, CORP etc, like "ROBERT JONES, LLC".
>>> 
>>>   
>> Just a workaround, but why don't you take the comma out of the string  
>> when it contains "INC, LLC, CORP etc," before you process it with  
>> your regex statement?
>>   
>> 
>
> That reminds me ... what is the difference between a workaround and a 
> kludge ?
>
>   
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-14 Thread Paul Newton
Kenneth Kixmoeller/fh wrote:
> On Jun 14, 2007, at 3:34 PM, Frank Burcaw wrote:
>
>   
>> It  works pretty good, but I realized that the user could enter a
>> comma before the word INC, LLC, CORP etc, like "ROBERT JONES, LLC".
>> 
>
> Just a workaround, but why don't you take the comma out of the string  
> when it contains "INC, LLC, CORP etc," before you process it with  
> your regex statement?
>   

That reminds me ... what is the difference between a workaround and a 
kludge ?

>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: [NF] RegEx Help

2007-06-14 Thread Kenneth Kixmoeller/fh

On Jun 14, 2007, at 3:34 PM, Frank Burcaw wrote:

>
> It  works pretty good, but I realized that the user could enter a
> comma before the word INC, LLC, CORP etc, like "ROBERT JONES, LLC".

Just a workaround, but why don't you take the comma out of the string  
when it contains "INC, LLC, CORP etc," before you process it with  
your regex statement?


___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.