Search / replace
jim at visitrieve.com
Sat Feb 20 08:53:47 EST 2010
> This sounds like a perfect job for the replacetext command...
> ...there's a way to do that but I'm not sure how.
> At any rate, once you get the right regex figured out, it's a one-liner
> to do what you want.
Glen, while Jacque works on a regex and after getting some sleep, ;-) here
is the correct way to do what you want in a "readable" Rev loop (replace
*FieldName* with the name of your actual field and put this code into a
on mouseUp pMouseBtnNo
put replaceChar("[", the text of fld "FieldName") into fld "FieldName"
function replaceChar pCharToReplace, pString
put offset(pCharToReplace,pString) into tOffset
if tOffset = 0 then exit repeat
if char (tOffset - 1) of pString is an integer then
put "_" into char tOffset of pString
put empty into char tOffset of pString
Aloha from Hawaii,
More information about the Use-livecode