|
In a message dated 4/11/2006 11:58:40 P.M. Eastern Standard Time,
[EMAIL PROTECTED] writes:
> ----- Original Message -----
> From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[email protected]> > Sent: Wednesday, April 12, 2006 2:10 AM > Subject: Re: Regexp question > > > > > > In a message dated 4/11/2006 7:29:18 P.M. Eastern Standard Time, > > [EMAIL PROTECTED] writes: > > > >> Hi, > >> > >> I was trying to build a regexp that removed all vowels from a word > >> except the first character. So > >> > >> hello -> hll > >> Apple -> Appl > >> > > > > > > hi steve -- > > > > how about > > > >>perl -we "my $s = 'aspire apple hello easy uvula'; $s=~ s/\B[aeiou]//gi; > > print $s" > > > Hi Bill, this fail. Try this > > perl -we "my $s = 'WilliamaWalters'; $s=~ s/\B[aeiou]//gi; print $s" > > Result is "WllamWltrs" istead of "WllmWltrs" :-) hi petr --
i get the expected result on my windows xp system: see screen shots
below.
what perl version/os are you using?
best regards -- bill walters
C:[EMAIL PROTECTED]@ont.com>perl -we "my $s = 'WilliamaWalters';
$s=~ s/\B[aeiou]//gi; print $s"
WllmWltrs C:[EMAIL PROTECTED]@ont.com>perl -we "my $s = 'WilliaeoumaWalters';
$s=~ s/\B[aeiou]//gi; print $s"
WllmWltrs C:[EMAIL PROTECTED]@ont.com>perl -v
This is perl, v5.8.2 built for MSWin32-x86-multi-thread
(with 25 registered patches, see perl -V for more detail) Copyright 1987-2003, Larry Wall
Binary build 808 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos. Built Dec 9 2003 10:19:40 |
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
