[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SpeechIO-28] /'s in Speechd.sub



This should work as an alternative:

$text =~ s/\b(.+?\b)/$wordsub{$1} || $1/eg;


it basicly says:  word boundry (anything, non-greedy) word boundry

I'm going to incorporate it into my changes...unless you say otherwise.

can someone try it out?


thanks,
k

------------------------------------------------------------------------------
"Perl combines all of the worst aspects of BASIC, C and line noise." 
    -- Keith Packard <keithp@ncd.com>
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

On Mon, 9 Aug 1999, Darxus wrote:

> On Mon, 9 Aug 1999, Darxus wrote:
> 
> > To "fix" this problem, I believe I'd have to do it much less efficiently.
> > Using a foreach & doing a regex replacement for every key in the hash on
> > every line submitted to speechd. 
> 
> On second thought... I should be able to do a hash lookup on all strings,
> seperated by whitespace (instead of all alphabetic strings seperated by
> non-alphabetic characters).  Neat.   
> __________________________________________________________________
> PGP fingerprint = 03 5B 9B A0 16 33 91 2F  A5 77 BC EE 43 71 98 D4
>             darxus@op.net / http://www.op.net/~darxus
>                          Far Beyond Reason
> 
>