Search / replace

Kee Nethery kee at kagi.com
Sat Feb 20 19:04:14 EST 2010


This may not be the fastest but I think it is easy to grok a year later when you are revisiting the code

repeat with x = 0 to 9
  replace (x & "[") with (x & "_") in theField
end repeat


> 
> For all [ in the field I need to check to see if the character to it's
> immediate left is a number.
> 
> If it is a number then the [ is to be converted into an _.
> 
> If it is not a number then the [ is to be removed (no substitution or
> spaces).
> 
> I need to be able to cycle through the entire field which each line may
> contain several [.
> 
> Any thoughts would be appreciated as I have tried using a combination of
> find characters and foundchunk on the field without success.
> 
> thanks,
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




-------------------------------------------------
I check email roughly 2 to 3 times per business day. 
Kagi main office: +1 (510) 550-1336





More information about the use-livecode mailing list