in reply to Variable-width negative lookbehind
If I correctly understand the problem, you can do this using either:
or$string =~ s/([^Y])X+/$1/g;
depending on whether "YXX" should yield "YX" or be left unchanged.$string =~ s/([^YX])X+/$1/g;
Hugo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Variable-width negative lookbehind
by dragonchild (Archbishop) on May 05, 2004 at 14:16 UTC | |
by Ovid (Cardinal) on May 05, 2004 at 14:37 UTC | |
by dragonchild (Archbishop) on May 05, 2004 at 14:40 UTC |