in reply to Help Needed for Spellcheck
Regexes can do this for you, for a reasonably small number of atomic words:<compound-word> := <word> <compound-word> <word> := word1 | word2 | ... | wordn
Alternatively, check out Aspell, as it has some support for compound words.my $compound = "onlinetrading"; my $words = 'online|trading'; my ($first, $second); if ($compound =~ /^($words)($words)$/) { $first = $1; $second = $2; } print "$first, $second\n";
-Mark
|
|---|