in reply to should this backspace removal code be done better?
If you don't have two backspaces in a row, this quick and dirty will do it:
$_ = "this is an\b correct usage"; s/.[\b]//g; print;
Note that \b is a word boundary within a regex but a backspace within a character class.
For a more correct solution, see the Unix col command or col for PPT. See also Removing characters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: should this backspace removal code be done better?
by smackdab (Pilgrim) on Oct 05, 2003 at 06:35 UTC | |
by shenme (Priest) on Oct 05, 2003 at 08:11 UTC |