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

Re: U2 frame



Reply to note from Harry Binswanger  Sun, 11 Sep
2011 01:15:14 -0400

> What I'm after is changes with wildcards (i.e., varying text).
> E.g., one frame should change *all* the following in one swell
> foop:
>
> The father left the son today. ==> The son left the father
> today.
> The master left the slave today. ===> The slave left the
> master today.
> The platoon left the sergeant today. ===> The seargeant left the
> platoon today.

Ah, okay. Now I get it. I'd still use XS to do the heavy lifting;
it's more elegant, and faster.

Try the following frame, SWAPWILD. Issue SWAPWILD with no
argument to see the usage. In your example, you'd issue:

SWAPWILD The [W] left the [W] today.

where "[W]" stands for the reverse-video W wildcard. Operation is
from top to bottom of the current file.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5swapwild*}} Swap wild substrings in current file [CLD 9/1
1/11][cr|lf]{002}{<}IF{<}VA$WS{>}==1{>}{<}IF{<}VA|50{>}>0{>}[
BX_]es 1[Q2_][DX_][TF_][255+048+068][CL_]{<}SV01,[wW]{>}{<}SX
02,0{>}{<}SV03,{>}{<}XS50,01,04,,03{>}{<}SV05,{>}{<}XS03,01,0
6,,05{>}{<}LBa{>}[BX_]se/f {252}{<}PV50{>}{252}[Q2_]{<}IF@not
({<}ER{>}){>}[YD_][DF_][BX_]se {252}{<}PV50{>}{252}[Q2_][DF_]
{<}SV07{>}{<}SV08,{>}{<}XS07,04,03,09,08{>}{<}SV10,{>}{<}XS08
,06,11,,10{>}{<}SV12,{>}{<}XS10,05,13,,12{>}{<}SX14,{<}IS04{>
}+{<}IS13{>}+{<}IS06{>}+{<}IS11{>}+{<}IS12{>}+{<}IS05{>}{>}[D
O_]{<}SX07,"Change to """+{<}IS14{>}+""" (y|N){>}{<}PR@07{>}{
<}SX07,@upr({<}RK{>}){>}{<}IF{<}VA$KC{>}<2{>}[YD_]{<}PRQuit{>
}{<}EX{>}{<}EI{>}{<}IF{<}IS07{>}=="Y"{>}[DN_]{<}GT14{>}[DX_]{
<}SX02,{<}PV02{>}+1{>}{<}EI{>}[YD_]{<}GLa{>}{<}EI{>}[TF_][RC_
]{<}SX01,{<}IS02{>}+" changes{>}{<}PR@01{>}{<}EX{>}{<}EI{>}{<
}PRSWAPWILD fee[W]fi[W]foo{>}{<}EX{>}{<}EI{>}{<}PRNo
 file{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx