I'm sure the original poster appreciates the tips.. Though my post wasn't so much on how to do what he was doing (strip VT100 escape sequences), but how he might figure it out for himself. I didn't do anything beyond his requirements deliberately (because I can't speak for all escape sequences).