Thank you very much for the reply. As a nubie, I'll have to sit down and munch on this for a while to get it ...
cheers!
rc
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br on behalf of Rici Lake
Sent: Sun 4/24/2005 10:48 AM
To: Lua list
Cc:
Subject: Re: Lua Patterns: How do I express this pattern?
On 24-Apr-05, at 11:13 AM, Cena, Resty wrote:
> Hello,
> How do I express this pattern:
>
> CrV
>
> that is, a sequence of any C(onsonant) followed by a specific letter,
> in this case r, followed by any V(owel).
>
> I guess if I can define somewhere that
>
> %k (consonants)
> $v (vowels)
>
> then I can easily say:
>
> [%kr%v]
>
> Any help on how I can accomplish this?
>
> Thanks.
>
EPCOR?
anyway, leaving out curiosities like when y is a vowel:
V = "[aeiouyAEIOUY]"
K = "[bcdfghjklmnpqrstvwxzBCDFGHJKLMNPQRSTVWXZ]"
function krv(r)
return K..r..V
end
consonant_y_vowel = krv"y"
string.find(str, consonant_y_vowel)