I have to remove punctuation so that I can look in a dictionary to list all possible 
completions of the english word: "te*t".
ie. teat teet tent test text

If I leave the punctuation in, there will be no dictionary matches on "te*t,".

Is that clearer now?
Lonya


---
The tagline below makes free email possible...




On Mon, 18 Jun 2001 06:07:58  
 Giorgos Keramidas wrote:
>On Sun, Jun 17, 2001 at 07:35:06PM -0700, Lonya wrote:
>> Hi all,
>> 
>> I could use some help. I'm trying to retain punctuation in sentences
>> when doing a spell check.
>> 
>> Say I have a line like this:
>> This *s a te*t, this *s only a te*t.
>> 
>> And I'd like to replace "te*t," with "test," after a dictionary
>> lookup. Well, I can split out the punctuation easily enough, but I
>> don't know how to join it back in later.
>
>Why do you have to remove punctuation in the first place ?
>
>    % cat hello.pl
>
>    $a = "t*st";
>    print "$a\n"; 
>    $a =~ s/\*/e/;
>    print "$a\n";
>
>    % perl hello.pl
>
>    t*st
>    test
>
>-giorgos
>


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

Reply via email to