Paul Johnson wrote:
> On Wed, Jan 10, 2007 at 10:32:54AM -0500, Jim Magnuson wrote:
> 
>>For purposes of doing some processing on a Finnish corpus, I want to  
>>convert repeated vowel strings to a single occurrence of the  
>>uppercase form of the vowel. That is:
>>
>>"aa" -> "A"
>>"ii" -> "I"
>>"oo" -> "O"
>>
>>Is it possible to do this without specifying separate substitutions  
>>for each vowel?
> 
> s/([aeiou])\1/uc $1/ge

You can do that without the /e option:

s/([aeiou])\1/\U$1/g



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to