This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: <OFFTOPIC> Perl <STDIN> From: Juho Cederstrom <cederstrom@kolumbus.fi> Date: Thu, 13 May 1999 19:05:46 +0300 Anthony E Greene wrote: > Steve's right. You'll have to write a subroutine that looks for backspaces > and removes the previous non-backspace character. Like this one? --- $_ = "sometihng\nDDDDDhing"; s/([^D]*)(D+)/ substr( $1, 0, length($1)-length($2) ) /ge; print; --- Of course you'll have to replace D characters with something else. I think that my regexp looks ugly. Maybe somebody else will show me a better way? ===