Matching two lists of users

Scott Penrose scottp at
Tue Jun 17 01:18:03 CDT 2003

Hash: SHA1

Hey Dudes,

I am writing code to match a set of users. One set is a set of users 
existing on a system, I have their login name, first and last name. The 
other list is a list a user has typed in and I want to match users 
where ever I can.

The basic rules are simple. If I find a match and there is only one of 
that type then I accept that.

For example, the user

	scottp = Scott Penrose

Would match on

	Scott Penrose
	Penrose, Scott
	Scott D Penrose
	Penrose, Scott D

Ignoring case, and ignoring spurious white space.

However, if there is a Simon Portis also in my list of users, then SP 
would not be a valid match as it is can't be absolutely determined.

The code is not that hard or complex, but it strikes me as being 
extremely useful.

One thing I thought very useful for is matching in a search and in 
email address in your email program. You can match on people in your 
list and even who you have ever sent mail to.

But... like always, as soon as I think something is useful I find it is 
usually already written. So ... does anyone know of a module like this 
on CPAN etc ?

- -- 
Scott Penrose
Welcome to the Digital Dimension
scottp at

Dismaimer: Contents of this mail and signature are bound to change 
randomly. Whilst every attempt has been made to control said 
randomness, the author wishes to remain blameless for the number of 
eggs that damn chicken laid. Oh and I don't want to hear about 
butterflies either.
Version: GnuPG v1.0.6 (Darwin)
Comment: For info see


More information about the Melbourne-pm mailing list