You might be able to eliminate the second SHELL statement by changing "\x20\x1B+\x0A" to "\x20\x1B+\x0A|[^\x20]\x1B+".

This is an OR condition where the RegEx engine will match "\x20\x1B+\x0A" or "[^\x20]\x1B+". The [^\x20] says any character that is not a "space". This makes the two condition mutually exclusion and therefore should run smoothly without stepping on each other.

Give it a try and let me know.

[ 02. October 2003, 05:34: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/