On Thu, Mar 07, 2002 at 09:52:43AM -0500, Nikola Janceski wrote: > I think I am asking a bit much on this... > > I was wondering if there is a module out there that will find a the common > pattern among an array of strings and return the regular expression to match > the common part.
Do you really want a regular expression? How about: sub common { ".*" } > ie: > @stuff = qw (123crapstuff morecrap crappedshit); > > I want the module to return 'crap' since that is the common part in all the > items. > > I know... real long shot. I tried searching but don't even know what to > search for. Try Algorithm::Diff. I doesn't do just what you want, but it might get you part of the way there. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]