Thank you so much for the professional explanation. I am wondering if there is any other weird chars I need to guard against in addition to the ANSI color codes. Is that possible that some other options of some other commands may include in the standardin some control chars I can not detect with regular perl regexp patterns? Have a good weekend. ginger