[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: folding double vowels?
- From: Geoff Leyland <geoff_leyland@...>
- Date: Thu, 23 May 2013 06:47:02 +1200
On 23/05/2013, at 6:42 AM, Petite Abeille <petite.abeille@gmail.com> wrote:
> Hello,
>
> Brain freeze of the day… what would be a reasonable Lua string pattern to fold double vowels into one?
>
> Got the following at the moment:
>
> print( ( 'aaaa aaa aa a aaaaa' ):gsub( '([aeiou]?)([aeiou]?)', '%1' ))
>
>> aa aa a a aaa
>
> Is there a more straightforward way?
This is only a slight improvement, but it seems to work.
> print( ( 'aaaa aaa aa a aaaaa' ):gsub( '([aeiou])[aeiou]', '%1' ))
aa aa a a aaa 6