Reply To: MLP to Batch

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf MLP to Batch Reply To: MLP to Batch

#57123
Charlie Bursell
Participant

Won’t work Gene.  First of all Tcl will not evaluate the variable inside the curly braces so {$text} becomes literally $text.

Out of the string “x0d x1c x0d x0b “, you only wnat to get rid of “x1c x0d x0b “.  The first x0d is the termination character for the last segment of the previous message.  You need to keep it.

Also there will be “x1cx0d” at the end of the last message but no “x0b” and there is a “x0b” before the first message without the other stuff.

I would do it in two steps

Try this:

# Get rid of all x1c and x0b

regsub -all — {[x1cx0b]} $msg {} msg

# Replace two carriage returns with carriage return line feed

regsub -all — {rr} $msg “rn” msg

Note the rn replacement string is *NOT* inside curly braces since it must be evaluated as a carriage return and newline by Tcl

Good luck with it

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,291
Replies
34,426
Topic Tags
286
Empty Topic Tags
10