Re: Grep on dictionary words
Dotan Cohen wrote:
>
> This means that only words that start with a caps are valid. I need
> "can start with a caps, but caps can be nowhere else". I got that like
> this:
> grep "^[A-Za-z][a-z]*$"
> However I think that there is a better way.
>
> This is a good exercise. I am bettering my regex skills as I learn
> what works and what doesn't.
>
Ever thought of using perl or python
i.e. libtext-aspell-perl
NAME
Text::Aspell - Perl interface to the GNU Aspell library
SYNOPSIS
use Text::Aspell;
my $speller = Text::Aspell->new;
die unless $speller;
# Set some options
$speller->set_option('lang','en_US');
$speller->set_option('sug-mode','fast');
# check a word
print $speller->check( $word )
? "$word found\n"
: "$word not found!\n";
Reply to: