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

Re: search/replace program



Reply to note from Bill Troop  Sun, 24 Mar 2002
16:42:30 -0500

> Has anyone got a simple program that will take email-style
> underlines (i.e _underline_) and convert the first one to
>  and the second to 

Here is a revision to the routine I posted the other night, with a
couple of minor refinements/corrections:

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; MDULMDIT.PM -- CLD rev. 3/26/02[cr|lf];*; Change-Verify _
phrase_ or *phrase* to [255+65+69]MDUL[255+65+70]|[255+65+69]
MDIT[255+65+70]phrase[255+65+69]MDNM[255+65+70][cr|lf];*;[cr|
lf]{<}SV01,UL{>};*; <== UL or IT (or any other valid MoDe!)[c
r|lf];*;[cr|lf][XH_][BX_]es 1[Q2_]{<}IF{<}VA|01{>}<1{>}{<}SV0
1,UL{>}{<}EI{>};*;[cr|lf]{<}SX01,"{<}MD"+@upr({<}IS01{>})+"{>
}"{>}{<}SV02,{<}MDNM{>}{>};*;[cr|lf]{<}SV03,{>}{<}IF{<}VA$DT{
>}>0&{<}VA$DT{>}<>8{>}[TG_]{<}SV03,[TG_]{>}{<}EI{>}{<}SX04,{<
}CP{>}{>};*;[cr|lf]{<}LBa{>}[BX_]se "[wS]_[wO][wS]*"[Q2_]{<}I
F@not({<}ER{>}){>}{<}SX05,"Change to "+{<}IS01{>}+"...{<}MDNM
{>}? (y|N|Esc)"{>}{<}PR|@05{>}{<}SX05,{<}RK{>}{>};*;[cr|lf]{<
}IF{<}VA$KC{>}<2{>}{<}LBb{>}{<}PV03{>}[BX_]jmp {<}PV04{>}[Q2_
]{<}PRDone{>}{<}EX{>}{<}EI{>};*;[cr|lf]{<}IF{<}VA$KC{>}==21{>
}[YD_][DF_][CL_][DF_]{<}SV05{>}[DN_]{<}SX06,{<}CP{>}{>}{<}GT0
1{>};*;[cr|lf][BX_]se "{<}PV05{>}[wS]"[Q2_]{<}IF{<}ER{>}{>}[B
X_]jmp {<}PV06{>}[Q2_][DF_][BX_]se [w>][Q2_][DF_][DN_]{<}SX0
6,"Unbalanced "+{<}IS05{>}+"!"{>}{<}PR@06{>}[BX_]p[Q2_]{<}GLa
{>}{<}EI{>};*;[cr|lf][CL_][BD_]{<}GT02{>}[BX_]se [w>][Q2_]{<
}EI{>}{<}GLa{>}{<}EI{>}{<}GLb{>}[cr|lf][cr|lf]
-nd
XPLeNCODE

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