in reply to Weird "soundex" algorithm
tr//, m// and s///, pos and substr are your friends :)sub weirdex { local $_ = shift; tr/a-zA-Z//dc; tr/a-zA-Z//s; m/[aeiou]/g and substr($_, pos) =~ s/[aieuo]//g; $_; } print "$_ - ", weirdex($_), $/ for "giulienk", "larry wall", "etheroskedasticity"; __output__ giulienk - gilnk larry wall - larywl etheroskedasticity - ethrskdstcty
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Weird "soundex" algorithm
by giulienk (Curate) on Aug 28, 2003 at 15:32 UTC | |
|
Re: Re: Weird "soundex" algorithm
by diotalevi (Canon) on Aug 28, 2003 at 19:10 UTC | |
by broquaint (Abbot) on Aug 28, 2003 at 23:58 UTC | |
by diotalevi (Canon) on Aug 29, 2003 at 01:53 UTC |