msa81
18.11.2008, 16:06
Hi,
I am trying to use SRXTEXT to remove control characters from MTEXT. The colour control characters are something like this: {\\C255; or {\\C2; or just \\C2;
I have successfully use the regexp from the command line however I would like to construct a lisp routine but the program seems to function differently. For example.
entering the commands:
srxtext
r
\(.\){\\C[0-9];\(.\)
\1\2
L
A
will replace "texttext{\\C2;text}text" with "texttexttext}text"
this works correctly but if I try to do this:
(srxtext "Regular" "\(.\){\\C[0-9];\(.\)" "\1\2" "All")
it will return 0. I have managed to get the following to work
(srxtext "Regular" "\{\\\\C[0-9];" "###" "All")
which will replace {\\C2; with "###" but
(srxtext "Regular" "\(.\)\{\\\\C[0-9];\(.\)" "\1\2" "All")
will also return 0.
why does this not work? Could someone please point me in the right direction? thanks very much!
I am trying to use SRXTEXT to remove control characters from MTEXT. The colour control characters are something like this: {\\C255; or {\\C2; or just \\C2;
I have successfully use the regexp from the command line however I would like to construct a lisp routine but the program seems to function differently. For example.
entering the commands:
srxtext
r
\(.\){\\C[0-9];\(.\)
\1\2
L
A
will replace "texttext{\\C2;text}text" with "texttexttext}text"
this works correctly but if I try to do this:
(srxtext "Regular" "\(.\){\\C[0-9];\(.\)" "\1\2" "All")
it will return 0. I have managed to get the following to work
(srxtext "Regular" "\{\\\\C[0-9];" "###" "All")
which will replace {\\C2; with "###" but
(srxtext "Regular" "\(.\)\{\\\\C[0-9];\(.\)" "\1\2" "All")
will also return 0.
why does this not work? Could someone please point me in the right direction? thanks very much!