Re: RegExp Problem using Substitutions.

2009-02-24 Thread Rob Dixon
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

Re: RegExp Problem using Substitutions.

2009-02-24 Thread John W. Krahn
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

Re: RegExp Problem using Substitutions.

2009-02-24 Thread John W. Krahn
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.

RE: RegExp Problem using Substitutions.

2009-02-24 Thread ramesh.marimuthu
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 w

RegExp Problem using Substitutions.

2009-02-24 Thread Deviloper
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 get this result. But I don“t know how to av