From: Phil Rhoades Date: 2008-04-27T02:13:09+09:00 Subject: Re: Howto get array.agrep (NOT array.grep) jens, On Sat, 2008-04-26 at 23:15 +0900, Jens Wille wrote: > hi phil! > > if all you want is getting all the strings within a certain edit > distance of your pattern, have a look at [1]. it doesn't support > regular expressions in the pattern because i don't how to achieve > that easily without re-implementing agrep's algorithm ;-) it's > really just a quick hack that might get you started, hopefully. > > [1] > This might work but it would be more difficult without regexs - the current application does a system call to agrep but of course it is very slow for large numbers of calls. A typical call is something like: agrep -2 "Smith\|J.*12345" list1.txt list2.txt list3.txt This allows two differences on a minimum amount of information consisting of last name, first initial and zip code. If I use the Enumerable version, I would have to use the whole, delimited, name & address string and increase the differences/distance number? Did you just do that hack now? - how do I get/install it? (Fedora 8). Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Fax: +61:(0)2-8221-9599 E-mail: phil@pricom.com.au