Matching two lists of users
Scott Penrose
scottp at dd.com.au
Tue Jun 17 01:18:03 CDT 2003
-----BEGIN PGP SIGNED MESSAGE-----
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
scottp
Scott Penrose
Penrose, Scott
Scott D Penrose
Penrose, Scott D
SDP
SP
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 ?
Scooter
- --
Scott Penrose
Welcome to the Digital Dimension
http://www.dd.com.au/
scottp at dd.com.au
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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (Darwin)
Comment: For info see http://www.gnupg.org
iD8DBQE+7rKfDCFCcmAm26YRAp0mAJ4ibKDe2Z2Pxos5E9o/pZtGNOxavACdG/tV
jLFhHoYjrylrRFSw0c+uJ6g=
=ucyq
-----END PGP SIGNATURE-----
More information about the Melbourne-pm
mailing list