%RxReplaceStr("text some text", "[a-z]+", "(X)") ;returns text: (X) (X) (X)
%RxReplaceStr("text some text", "[a-z]+", "(X)", 1, 0) ;returns text: (X) (X) (X)
%RxReplaceStr("text some text", "[a-z]+", "(X)", 1, 2) ;returns text: (X) (X) text
%RxReplaceStr("text some text", "[a-z]+", "(X)", 2, 1) ;returns text: t(X) some text
%RxReplaceStr("text some text", "[a-z]+", "(X)", 5, 1) ;returns text: text (X) text
%RxReplaceStr("text some text", "[a-z]+", "(X)", 20, 0) ;returns text: text some text
%RxReplaceStr("text some text", "[a-z]+", "(X)", 0, 20) ;returns text: (X) (X) (X)
2 Comments
Anonymous
1) Neskodily by uviest link ake regularne vyrazy su podporovane
2) Hodily by sa aj ine priklady napr. ako v "M..meno..sufix" nahradit retazec "..meno.." inym retazcom nakolko znak "." v reg.vyrazoch reprezentuje prave jeden znak a potom Vykonanie funkcie
%RxReplaceStr
("M..meno..sufix", "..*..", ".other."
) ma za vysledok retazec "other" namiesto ocakavaneho "M.other.sufix" ...D2000 Dev Team
DS: Dobrý deň,
Riešenie na Váš problém by teda vyzeralo nasledovne: %RxReplaceStr("M..meno..sufix", "\..([^\.]+)\..", ".other.")
Add Comment