Deviloper wrote:
> Hi there!
>
> I have a string "bbbababbaaassass". I want to get a string without any
> double a 'aa' or and without the 'b's.
>
> but if I do:
>
> my $s = "bbbababbaaassass";
> $s=~ s/aa|b//g;
>
> as a result I will get a string "aaassass".
>
> (I understand WHY I g
John W. Krahn wrote:
Deviloper wrote:
Hi there!
Hello,
I have a string "bbbababbaaassass". I want to get a string without
any double a 'aa' or and without the 'b's.
but if I do:
my $s = "bbbababbaaassass";
$s=~ s/aa|b//g;
as a result I will get a string "aaassass".
(I understand
Deviloper wrote:
Hi there!
Hello,
I have a string "bbbababbaaassass". I want to get a string without
any double a 'aa' or and without the 'b's.
but if I do:
my $s = "bbbababbaaassass";
$s=~ s/aa|b//g;
as a result I will get a string "aaassass".
(I understand WHY I get this result.
Try this:
$s=~s/b|ab*a//g;
-Original Message-
From: Deviloper [mailto:devilo...@slived.net]
Sent: Tuesday, February 24, 2009 4:03 PM
To: beginners@perl.org
Subject: RegExp Problem using Substitutions.
Hi there!
I have a string "bbbababbaaassass". I want to get a string without any