Commande:
PW_SUPPRIME_COL
Famille: TEXTE
Desc: suprime la description de couleur dans un mtext
Syntaxe: str
Autres informations:
;;(pw_supprime_col "\\fArial Narrow|b0|i0|c0|p34") -> "\\fArial Narrow|b0|i0|c0|p34" car c0 n'est pas une couleur
;;(pw_supprime_col "dUCALQUE\\P{\\C147;cYAN\\C4;\\P\\C2;JAUNE\\P\\C0;dUBLOC\\P}dUCALQUE") -> "dUCALQUE\\P{cYAN\\PJAUNE\\PdUBLOC\\P}dUCALQUE"
;;les autre codes connus :
;; |b1|i1| : bold et italique sinon b0,i0
;; \\L = souligné
;; \\O = chapauté
;;décodage couleur :
;;;(setq res (Pw_RegExp "\\c0|p34" "(\\\\|\|)C\\d+(;|\|)")) ->
;;;((("MATCH" "\\c0") ("@" 0) ("LENGTH" 3) (("$0" "\\") ("$1" ""))))
;;;(setq res (Pw_RegExp "dUCALQUE\\P{\\C147;cYAN\\C4;\\P\\C2;JAUNE\\P\\C0;dUBLOC\\P}dUCALQUE" "(\\\\|\|)C\\d+(;|\|)")) ->
;;;((("MATCH" "\\C147;") ("@" 11) ("LENGTH" 6) (("$0" "\\") ("$1" ";"))) (("MATCH"
;;;"\\C4;") ("@" 21) ("LENGTH" 4) (("$0" "\\") ("$1" ";"))) (("MATCH" "\\C2;")
;;;("@" 27) ("LENGTH" 4) (("$0" "\\") ("$1" ";"))) (("MATCH" "\\C0;") ("@" 38)
;;;("LENGTH" 4) (("$0" "\\") ("$1" ";"))))
;;detail du regexp :
;; (\\\\|\|) : soit \\ soit |
;; C : un C
;; \\d+ : au moin 1 digit
;; (;|\|) : soit ; soit |
E:\powerclic\Ut_str.lsp