Re: I didn't know this...

2014-12-28 Thread Mike Bonner
I too would prefer this way because its the livecode readable way. While this particular one is a pretty simple regex-- put replacetext(tNames,(\bc),x) it would get complicated way too fast depending on need. A for each loop would be fine and work fast also, but I personally wouldn't mind your

Re: I didn't know this...

2014-12-28 Thread Peter M. Brigham
On Dec 27, 2014, at 1:54 PM, dunb...@aol.com wrote: The beauty of xTalk chunking expressions is that they do just this sort of thing. So if you had: ABCDEFG in a field 1, you can just as easily: -- replace D with empty in fld 1 -- delete char 4 of fld 1 Yeah, that stuff is basic. I

Re: I didn't know this...

2014-12-28 Thread Peter Haworth
Expanding the use of each would be great! delete item 2 of each line of tVar, for example Pete lcSQL Software On Dec 27, 2014 10:44 PM, Geoff Canyon gcan...@gmail.com wrote: It's too bad this won't work: put bob carol ted alice into S replace c with x in char 1 of each word of S

I didn't know this...

2014-12-27 Thread Peter M. Brigham
Other people may already know this, but I just discovered that you can do something like: put 12.34.56.78 into p replace . with empty in char 4 to -1 of p and sure enough, you get 12.345678 I did not know that the replace command can work on a chunk within a variable. The documentation

Re: I didn't know this...

2014-12-27 Thread dunbarx
-Original Message- From: Peter M. Brigham pmb...@gmail.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Sat, Dec 27, 2014 12:38 pm Subject: I didn't know this... Other people may already know this, but I just discovered that you can do something like: put 12.34.56.78

Re: I didn't know this...

2014-12-27 Thread dunbarx
-livecode@lists.runrev.com Sent: Sat, Dec 27, 2014 12:38 pm Subject: I didn't know this... Other people may already know this, but I just discovered that you can do something like: put 12.34.56.78 into p replace . with empty in char 4 to -1 of p and sure enough, you get 12.345678 I did not know

Re: I didn't know this...

2014-12-27 Thread Kay C Lan
Nice :-) This isn't limited to variables but for works for fields as well. Taken the liberty of entering an Enhancement Request - 14311 - that the Dictionary entry be amended to include your example and note that replace can also be used on chunks within a container, not just the entire

Re: I didn't know this...

2014-12-27 Thread Geoff Canyon
It's too bad this won't work: put bob carol ted alice into S replace c with x in char 1 of each word of S put S -- puts bob xarol ted alice On Sat, Dec 27, 2014 at 5:42 PM, Kay C Lan lan.kc.macm...@gmail.com wrote: Nice :-) This isn't limited to variables but for works for fields