![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Cleaning the Logby demerphq (Chancellor) |
on Sep 02, 2002 at 15:55 UTC ( [id://194601]=note: print w/replies, xml ) | Need Help?? |
Actually this is more complicated than a pure regex can handle (perl regexes _may_ be able to handle this, but the code would be scaaaary), this problem is even more difficult than handling balanced constructs and cannot be solved using a formal regular expression. This is because we cant simply look for .{BS}, as is clear from your sample data such as bnack{BS}{BS}{BS}{BS} where the last {BS} actually remove the 'n'. But only a slight amount of additional code will allow a working solution....
YMMV
Yves / DeMerphq
In Section
Seekers of Perl Wisdom
|
|