On 3/15/07, Ford, Mike <M.Ford@xxxxxxxxxxxxxx> wrote:
On 14 March 2007 08:25, Richard Lynch wrote: > On Tue, March 13, 2007 9:10 am, Todd Cary wrote: > > I would like to write a filter that takes the text "smith" or > > "SMith" and returns "Smith"; same for "ralph smith". > > No, you don't. :-) > > You *think* you want to write that function, but this is one of those > things that is *way* more complicated than it seems to the beginner. > > How about: > > O'Brian > McCormick > Rodham-Clinton > von Freeman > del Castillo
hmm, maybe when you write a function of 5000 lines implementing every rule for the english language, but well, if you look at what mike says below:
> . > . > . Not to mention MacDonald and Macdonald...!! ;( ;) Cheers! Mike
It is impossible to make a difference in that, only if you know that one of both is not wanted in this case. So then you should extend your function with another 5000 lines of exception code :) Tijnema
--------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: m.ford@xxxxxxxxxxxxxx Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php