in reply to Cleaning the Log
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....
YMMVmy $logdata=<<EOLOG; pass{BS}{BS}{BS}{BS}{BS}{BS} hee{BS}llo, I'll be bnack{BS}{BS}{BS}{BS}ack next saturday.{BS}{BS}{BS +}{BS}{BS}{BS}{BS}{BS}{BS}{BS}{BS}{BS} www.yahoo.com "keyloggers" + "linux"{BS}{BS}{BS} EOLOG my $clean; while ($logdata=~/\G(\{BS}|.)/sg) { length ($1)>1 && (length($clean)==0 || substr($clean,length($clean +)-1,1,"")) or $clean.=$1; } print $clean;
Yves / DeMerphq
---
Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Scaring the Log
by Aristotle (Chancellor) on Sep 03, 2002 at 14:34 UTC |