[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: convert _ _ to ital etc.



Reply to note from Bill Troop  Sat, 22 Sep 2001
12:03:43 -0400

Bill asks
> how to write a simple program that would go through a document
> and convert the first _ to a mdit (for example, or a mdul), the
> next to a mdnm, the next to a mdit, the next to a mdnm, and
> thus cycle through the document until the end.

Hmmm. The task is inherently not "simple." Both "_" and "*" occur
in other, critical contexts, notably URLs and filespecs. A dumb
toggle coupled with a blithe global CHange command could do a lot of
mischief. I'd go with a pair of Change Verify commands like the
following, which address both underscores and stars. Issue
DECODE to decode:


XPLeNCODE v2.0
b-gin [UNTITLED]
[BX_]cv /[wS]_[wA][wO][wS]*[wA]/[wS][w<]MD+IT[w>][wA]/[Q2_];*
;[cr|lf][BX_]cv /[wA]_[wS][wO][wA]*[wS]/[wA][w<]MD-IT[w>][wS]
/[Q2_];*;[cr|lf]{<}EX{>}[cr|lf]
-nd
XPLeNCODE


--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/