----- Original Message ----- From: "Steve Baldwin" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, April 12, 2006 12:48 AM
Subject: Regexp question


Hi,



I was trying to build a regexp that removed all vowels from a word except
the first character.  So



hello -> hll

Apple -> Appl



Not optimal, but

$_ = $string = 'Apple';
$string =~ s/[^aeiouy]//ig;
s/(^.).+$/$1/;
print $1 . $string;

Petr Vileta, Czech republic
(My server reject all messages from Yahoo and Hotmail. Send me your mail from another non-spammer site please.)


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to