Re: Replacetext of any characters between parentheses with a space

2021-06-10 Thread Paul Dupuis via use-livecode
On 6/9/2021 1:10 PM, Paul Dupuis via use-livecode wrote: on mouseup   put field "import" into timport   put replacetext(timport,"(.*)"," ") into field "import" end mouseup I think parenthesis are are reserved character in regex, so them may need to be

Re: Replacetext of any characters between parentheses with a space

2021-06-10 Thread Richmond Mathewson via use-livecode
! Another way. I couldn’t get the regex to work, despite Paul's > invaluable help reminding me that replacetext is a function. > > My cobbled together solution involved setting itemdel to parentheses then > deleting items. > > As the Grateful Dead rather repetitively put

Re: Replacetext of any characters between parentheses with a space

2021-06-10 Thread David V Glasgow via use-livecode
Ha! Another way. I couldn’t get the regex to work, despite Paul's invaluable help reminding me that replacetext is a function. My cobbled together solution involved setting itemdel to parentheses then deleting items. As the Grateful Dead rather repetitively put it: So many roads So

Re: Replacetext of any characters between parentheses with a space

2021-06-10 Thread Richmond Mathewson via use-livecode
t; just in case they are reserved in regex. Or do I need to enclose the > matchExpression in something other than or in addition to, quotes? > > on mouseup > > put field "import" into timport > > replacetext (timport, "(.*)", " ") &g

Re: Replacetext of any characters between parentheses with a space

2021-06-09 Thread David V Glasgow via use-livecode
D’Oh! Thanks Paul. Much appreciated. Cheers David G > On 9 Jun 2021, at 6:10 pm, Paul Dupuis via use-livecode > wrote: > > On 6/9/2021 1:03 PM, David V Glasgow via use-livecode wrote: >> on mouseup >> >> put field "import" in

Re: Replacetext of any characters between parentheses with a space

2021-06-09 Thread Paul Dupuis via use-livecode
On 6/9/2021 1:03 PM, David V Glasgow via use-livecode wrote: on mouseup put field "import" into timport replacetext (timport, "(.*)", " ") put timport into field "import" end mouseup replaceText is a function, not a command, so on mouseup

Replacetext of any characters between parentheses with a space

2021-06-09 Thread David V Glasgow via use-livecode
escaping the parentheses just in case they are reserved in regex. Or do I need to enclose the matchExpression in something other than or in addition to, quotes? on mouseup put field "import" into timport replacetext (timport, "(.*)", " ") put timport into f

Re: Wildcard? replaceText, offset?

2020-04-29 Thread Ben Rubinstein via use-livecode
put "(" & iNewNumber ")" into tReplacement put replaceText(tOldString , "\(\d+\)", tReplacement) into tNewString On 26/04/2020 20:15, dunbarx--- via use-livecode wrote: Pay no attention to the previous post, which only dealt with a single integer. Slopp

Re: Wildcard? replaceText, offset?

2020-04-27 Thread dunbarx--- via use-livecode
You are welcome. Er, my offering IS a one liner. Craig -Original Message- From: Rick Harrison via use-livecode To: How to use LiveCode Cc: Rick Harrison Sent: Mon, Apr 27, 2020 12:20 am Subject: Re: Wildcard? replaceText, offset? Thanks for the suggestions! I was hoping that perhaps

Re: Wildcard? replaceText, offset?

2020-04-26 Thread Thierry Douez via use-livecode
> Le 27 avr. 2020 à 08:37, J. Landman Gay via use-livecode > a écrit : > > On 4/26/20 1:24 PM, Rick Harrison via use-livecode wrote: >> In the middle-end part of the string I have “(x)” where x represents some >> integer. >> it could be (4) or (10) or (5) etc. >> I just want to replace the nu

Re: Wildcard? replaceText, offset?

2020-04-26 Thread J. Landman Gay via use-livecode
On 4/26/20 1:24 PM, Rick Harrison via use-livecode wrote: In the middle-end part of the string I have “(x)” where x represents some integer. it could be (4) or (10) or (5) etc. I just want to replace the number inside the () with whatever other number I need to. If there is only a single ins

Re: Wildcard? replaceText, offset?

2020-04-26 Thread Rick Harrison via use-livecode
Thanks for the suggestions! I was hoping that perhaps there was a very simple one liner or character that would do it for me. I think I have a solution now. Rick > On Apr 26, 2020, at 3:15 PM, dunbarx--- via use-livecode > wrote: > > on mouseUpput offset("(",yourString) into startCharput of

Re: Wildcard? replaceText, offset?

2020-04-26 Thread dunbarx--- via use-livecode
1) of  yourStringend mouseUp Craig -Original Message- From: doc hawk via use-livecode To: How to use LiveCode Cc: doc hawk Sent: Sun, Apr 26, 2020 2:41 pm Subject: Re: Wildcard? replaceText, offset? On Apr 26, 2020, at 11:24 AM, Rick reasoned > In the middle-end part of the stri

Re: Wildcard? replaceText, offset?

2020-04-26 Thread dunbarx--- via use-livecode
--Original Message- From: Rick Harrison via use-livecode To: How to use LiveCode Cc: Rick Harrison Sent: Sun, Apr 26, 2020 2:26 pm Subject: Wildcard? replaceText, offset? I have a very long string. In the middle-end part of the string I have “(x)” where x represents some integer. it could be (4)

Re: Wildcard? replaceText, offset?

2020-04-26 Thread doc hawk via use-livecode
On Apr 26, 2020, at 11:24 AM, Rick reasoned > In the middle-end part of the string I have “(x)” where x represents some > integer. > it could be (4) or (10) or (5) etc. If you’re certain that this is the only, or even the first, integer, a regular expression search and replace or [0-9]+ woul

Wildcard? replaceText, offset?

2020-04-26 Thread Rick Harrison via use-livecode
I have a very long string. In the middle-end part of the string I have “(x)” where x represents some integer. it could be (4) or (10) or (5) etc. I just want to replace the number inside the () with whatever other number I need to. I have been trying to find an easy way to do this. Ideally a

Re: Replacetext taking forever under 8.1.7

2017-12-11 Thread Mark Wieder via use-livecode
On 11/29/2017 12:30 PM, Brian Milby via use-livecode wrote: I downloaded 8.1.2 and performed the same test as above and the difference was substantial. I’m on a different machine, but the times appear consistent with the test I did on 7.x on the other one. https://github.com/livecode/livecode/p

Re: Replacetext taking forever under 8.1.7

2017-11-29 Thread Brian Milby via use-livecode
com> wrote: > 2017-11-23 21:27 GMT+01:00 Bruce Pokras via use-livecode < > use-livecode@lists.runrev.com>: > > > > > put replacetext(holdIt1,"[ ]{2,10}",empty) into holdIt > > > > Under 8.1.7 I get the dreaded spinning beachball, although the > re

Re: Replacetext taking forever under 8.1.7

2017-11-28 Thread Thierry Douez via use-livecode
2017-11-23 21:27 GMT+01:00 Bruce Pokras via use-livecode < use-livecode@lists.runrev.com>: > > put replacetext(holdIt1,"[ ]{2,10}",empty) into holdIt > > Under 8.1.7 I get the dreaded spinning beachball, although the replacetext > action eventually finishes (after 2

Re: Replacetext taking forever under 8.1.7

2017-11-27 Thread Brian Milby via use-livecode
Just tried this snip: *-- revidelibrary.8.livecodescript full path in the text field**put* url ( "file:" & the text of field "fileName") into holdIt1 *put* the milliseconds into tStart *put* replacetext(holdIt1,"[ ]{2,10}",empty) into holdIt *put* the mill

Re: Replacetext taking forever under 8.1.7

2017-11-27 Thread panagiotis merakos via use-livecode
e of 8.1.7’s 64-bit standalone app > capability for Mac OS X “High Sierra". That is when I found that under > either Yosemite or High Sierra a “replacetext" action takes over 20 minutes > under 8.1.7 while under 7.1.4 it takes less than one second! The > replacetext is to re

Replacetext taking forever under 8.1.7

2017-11-23 Thread Bruce Pokras via use-livecode
I am trying to port a stack that runs fine under Livecode 7.1.4 to Livecode 8.1.7 in order to take advantage of 8.1.7’s 64-bit standalone app capability for Mac OS X “High Sierra". That is when I found that under either Yosemite or High Sierra a “replacetext" action takes over 20 min

Re: replaceText usage

2016-11-16 Thread Richmond
You're a star! This works perfectly: put line QOUNT of fld "fSSS1" into PROCESST put replaceText(PROCESST,"unicodeT","t") into line QOUNT of fld "fSSS1" Thank you buckets! However, inevitably I cannot resist the occasion to have a "b*tchy&qu

Re: replaceText usage

2016-11-16 Thread Mike Bonner
quot;unicodeText" as the first parameter with PROCESST, and since its a function you need to do something with the output, so you can combine the 2 last lines and end up with.. put replaceText(PROCESST,"unicodeT","t") into line QOUNT of fld "fSSS1" As it is, (assuming yo

replaceText usage

2016-11-15 Thread Richmond
Would be grateful if someone could tell me why this is NOT working: put line QOUNT of fld "fSSS1" into PROCESST replaceText("unicodeText","unicodeT","t") put PROCESST into line QOUNT of fld "fSSS1" Oh, and, by the way, the URL for PERL

Re: replaceText problem

2015-01-12 Thread Peter Haworth
I found the problem. This was during the course of updating the RegEx Builder stack and there was code in there to put "(" before the regex if it didn't start with "(" and also to put ")" after the regex if it wasn't already there. In the above regex, that resulted in putting "(" before the regex

Re: replaceText problem

2015-01-11 Thread Kay C Lan
On Fri, Jan 9, 2015 at 8:22 AM, Peter Haworth wrote: > > [the]{3}\s(\w+)\s.*?(?=;) > > Using matchText in LC 6.5.2 it fails with error 301 pattern error. > Works fine in LC 7.0.1 on OS X 10.9.5 ___ use-livecode mailing list use-livecode@lists.runrev.co

Re: replaceText problem

2015-01-08 Thread Peter Haworth
On Tue, Jan 6, 2015 at 6:05 PM, Kay C Lan wrote: > LC uses the PCRE > implementation of regex. Yes there are different flavours of regex which is > why I like this online regex tester: > > https://regex101.com/#pcre > I've been using this site today to test out various examples while modifying t

Re: replaceText problem

2015-01-08 Thread Bob Sneidar
oookaay… so I’m beginning to see why I have a sock with embroidered flowers on it… Bob S On Jan 7, 2015, at 14:00 , J. Landman Gay mailto:jac...@hyperactivesw.com>> wrote: But the last time I tried it, I found *your* socks. On 1/7/2015 2:58 PM, Bob Sneidar wrote: The Jacqueline Landman Gay o

Re: replaceText problem

2015-01-07 Thread Geoff Canyon
On Tue, Jan 6, 2015 at 12:41 PM, J. Landman Gay wrote: > I know of one person who uses it in scripts. I find that difficult to read > and debug. > Unless you're already thinking of me, you know two. I will *very* occasionally do something like: put 10 into X; put 20 into Y _

Re: replaceText problem

2015-01-07 Thread Mark Wieder
Jacque- Tuesday, January 6, 2015, 8:36:43 PM, you wrote: > On 1/6/2015 9:58 PM, Mark Wieder wrote: >> Then in your traceBreak function you can parse it and do what you >> like. > No, no. In YOUR tracebreak function. I don't mess around in there, it's > too scary. You're the brave daredevil. We

Re: replaceText problem

2015-01-07 Thread Mark Wieder
Bob- Wednesday, January 7, 2015, 12:58:48 PM, you wrote: > The Jacqueline Landman Gay of the future uses them extensively in > her Time Travel Stack. If you don’t figure it out soon you will > never find your socks. I have enough trouble finding them as it is. -- -Mark Wieder ahsoftw...@gmail

Re: replaceText problem

2015-01-07 Thread J. Landman Gay
But the last time I tried it, I found *your* socks. On 1/7/2015 2:58 PM, Bob Sneidar wrote: The Jacqueline Landman Gay of the future uses them extensively in her Time Travel Stack. If you don’t figure it out soon you will never find your socks. Bob S On Jan 6, 2015, at 20:36 , J. Landman Gay

Re: replaceText problem

2015-01-07 Thread Bob Sneidar
The Jacqueline Landman Gay of the future uses them extensively in her Time Travel Stack. If you don’t figure it out soon you will never find your socks. Bob S On Jan 6, 2015, at 20:36 , J. Landman Gay mailto:jac...@hyperactivesw.com>> wrote: On 1/6/2015 9:58 PM, Mark Wieder wrote: Then in you

Re: replaceText problem

2015-01-07 Thread Bob Sneidar
Oh right, I knew about that. Bob S > On Jan 6, 2015, at 10:41 , J. Landman Gay wrote: > > On 1/6/2015 10:47 AM, Bob Sneidar wrote: >> There is a semicolon “trick”?? > > Yes, you can separate statement lines in scripts with a semicolon instead of > a return character. It's most useful in the

Re: replaceText problem

2015-01-06 Thread J. Landman Gay
On 1/6/2015 9:58 PM, Mark Wieder wrote: Then in your traceBreak function you can parse it and do what you like. No, no. In YOUR tracebreak function. I don't mess around in there, it's too scary. You're the brave daredevil. -- Jacqueline Landman Gay | jac...@hyperactivesw.com Hype

Re: replaceText problem

2015-01-06 Thread Mark Wieder
Jacque- Saturday, January 3, 2015, 9:53:38 PM, you wrote: > On 1/3/2015 5:52 PM, Mark Wieder wrote: >> Breakpoints don't have to be on a line by themselves. Haven't for >> several years now. For a while I toyed with having both breakpoints >> and tracepoints (log the context without stopping) by

Re: replaceText problem

2015-01-06 Thread Mike Bonner
Yeah, the regexbuilder is one of the plugins. Didn't know you could start the builder from find, will have to poke around. It would be very cool if someone (he says whistling nonchalantly and looking at the floor) updated the regex builder. On Tue, Jan 6, 2015 at 8:34 PM, Peter Haworth wrote: >

Re: replaceText problem

2015-01-06 Thread Peter Haworth
Hi Mike, That's one of RunRev's plugins, right? Sounds like a ripe candidate to be updated by some kind person :-) Interestingly I was prowling around the code for the Script Editor Find function a couple of days ago, the one you get when you click the more button, and came across a button that in

Re: replaceText problem

2015-01-06 Thread Mike Bonner
Ah k. My mistake again, works with the simplified old filter, not the current full regex filter. On Tue, Jan 6, 2015 at 8:16 PM, Mike Bonner wrote: > My mistake. Works with filter too. :) > > On Tue, Jan 6, 2015 at 8:13 PM, Mike Bonner wrote: > >> The regex builder thats part of LC is pretty go

Re: replaceText problem

2015-01-06 Thread Mike Bonner
My mistake. Works with filter too. :) On Tue, Jan 6, 2015 at 8:13 PM, Mike Bonner wrote: > The regex builder thats part of LC is pretty good for immediate feedback > too, and has the benefit that it can place (hopefull working) code into the > clipboard for pasting into script, after choosing ma

Re: replaceText problem

2015-01-06 Thread Mike Bonner
The regex builder thats part of LC is pretty good for immediate feedback too, and has the benefit that it can place (hopefull working) code into the clipboard for pasting into script, after choosing matchtext or matchchunk. (still helpful for figuring out the regex for filter, though no autogenerat

Re: replaceText problem

2015-01-06 Thread Peter Haworth
On Tue, Jan 6, 2015 at 6:47 PM, Kay C Lan wrote: > yeah, I use a local app - RegExhibit That's the one I use too. Pete lcSQL Software Home of lcStackBrowser and SQLiteAdmin ___

Re: replaceText problem

2015-01-06 Thread Kay C Lan
On Wed, Jan 7, 2015 at 10:31 AM, Peter Haworth wrote: > Good web site Kay, I've always used a local program on my Mac in the past > but that works better. > yeah, I use a local app - RegExhibit http://roger-jolly.nl/software/ for basic regex but for anything more complex I go to the site, main

Re: replaceText problem

2015-01-06 Thread Peter Haworth
On Tue, Jan 6, 2015 at 6:05 PM, Kay C Lan wrote: > I don't know where Pete was reading that certain regex characters are not > supported > It's in a dictionary note. However the note is not very clear. What it means is that if you are using matchtext with a character that is a regex special ch

Re: replaceText problem

2015-01-06 Thread Kay C Lan
On Wed, Jan 7, 2015 at 12:44 AM, Bob Sneidar wrote: > I read up on this, thinking that LC was implementing some substandard > regex functionality. Turns out this is the state of affairs in the regex > world. > > I don't know where Pete was reading that certain regex characters are not supported,

Re: replaceText problem

2015-01-06 Thread J. Landman Gay
On 1/6/2015 10:47 AM, Bob Sneidar wrote: There is a semicolon “trick”?? Yes, you can separate statement lines in scripts with a semicolon instead of a return character. It's most useful in the one-line message box but can be inconsistent there, where it usually works but sometimes doesn't.

Re: replaceText problem

2015-01-06 Thread Peter Haworth
On Tue, Jan 6, 2015 at 8:46 AM, Bob Sneidar wrote: > filter without idea I feel like this sometimes. Pete lcSQL Software Home of lcStackBrowser and SQLiteAdmin

Re: replaceText problem

2015-01-06 Thread dunbarx
ved with a watchpoint. Craig -Original Message- From: Bob Sneidar To: How to use LiveCode Sent: Tue, Jan 6, 2015 12:07 pm Subject: Re: replaceText problem Actually it is possible to say: if myVar is true then breakpoint But your filter without idea is a good one. Bob S On Jan 3, 2015

Re: replaceText problem

2015-01-06 Thread Bob Sneidar
Lawyers using regex. ;-) Bob S On Jan 4, 2015, at 08:00 , Dr. Hawkins mailto:doch...@gmail.com>> wrote: Plain regex is wonderful! :) Quite seriously, I rarely get through a week at my law office without using it . . . -- Dr. Richard E. Hawkins, Esq. __

Re: replaceText problem

2015-01-06 Thread Bob Sneidar
There is a semicolon “trick”?? Bob S On Jan 3, 2015, at 11:12 , J. Landman Gay mailto:jac...@hyperactivesw.com>> wrote: Well, there could be a comment after it. And some rare individuals use the semicolon trick to combine lines unexpectedly. But this should work for any line that starts with

Re: replaceText problem

2015-01-06 Thread Bob Sneidar
Actually it is possible to say: if myVar is true then breakpoint But your filter without idea is a good one. Bob S On Jan 3, 2015, at 10:36 , J. Landman Gay mailto:jac...@hyperactivesw.com>> wrote: I see now. Do you have to use regex? Breakpoint commands are always on a line by themselves.

Re: replaceText problem

2015-01-06 Thread Bob Sneidar
I read up on this, thinking that LC was implementing some substandard regex functionality. Turns out this is the state of affairs in the regex world. Bob S On Jan 3, 2015, at 09:35 , Peter Haworth mailto:p...@lcsql.com>> wrote: Looking into this further as there's a note in the dictionary tha

Re: replaceText problem

2015-01-04 Thread Kay C Lan
On Mon, Jan 5, 2015 at 4:25 AM, Peter Haworth wrote: > > Back on the need for a put or a get with a function, it's interesting to > note that you don't have to do that in the message box. Executing - > replaceText("abc","c","z") - in the

Re: replaceText problem

2015-01-04 Thread Peter Haworth
it's interesting to note that you don't have to do that in the message box. Executing - replaceText("abc","c","z") - in the message box puts "abz" into the message box result area. Pete lcSQL Software <http://www.lcsql.com> Home of lcStackBrow

Re: replaceText problem

2015-01-04 Thread Dr. Hawkins
On Sat, Jan 3, 2015 at 2:01 PM, Peter M. Brigham wrote: > For me, even plain regex is like a trip to the dentist. With no novocaine. > I understand that it's powerful, but I have rarely come across something I > couldn't do in livecode less painfully. > Plain regex is wonderful! :) Quite seri

Re: replaceText problem

2015-01-03 Thread J. Landman Gay
On 1/3/2015 5:52 PM, Mark Wieder wrote: Breakpoints don't have to be on a line by themselves. Haven't for several years now. For a while I toyed with having both breakpoints and tracepoints (log the context without stopping) by passing a parameter to breakpoints. Interesting, how does that work

Re: replaceText problem

2015-01-03 Thread Kay C Lan
On Sat, Jan 3, 2015 at 10:41 AM, Peter Haworth wrote: > > replaceText(pScript,"(^\s*breakpoint$"," ") > > Hi Peter, If this is exactly how your script is written then I see two problems: 1) you need to actually put the result into something so: put replaceT

Re: replaceText problem

2015-01-03 Thread Mark Wieder
Jacque- Breakpoints don't have to be on a line by themselves. Haven't for several years now. For a while I toyed with having both breakpoints and tracepoints (log the context without stopping) by passing a parameter to breakpoints. >filter tScript without "*breakpoint*" But that incantation

Re: replaceText problem

2015-01-03 Thread Peter M. Brigham
On Jan 3, 2015, at 4:44 PM, Dr. Hawkins wrote: > I haven't had to deal with multi-line regex in several years, but recall it > being like a trip to the dentist. For me, even plain regex is like a trip to the dentist. With no novocaine. I understand that it's powerful, but I have rarely come acro

Re: replaceText problem

2015-01-03 Thread Dr. Hawkins
On Sat, Jan 3, 2015 at 12:23 PM, Peter Haworth wrote: > I had to include "(?m)" at the start of the regex in order to to make it > work in multiline mode. > > The "^" at the start of my regex means "start of line" but unless you are > in multiline mode, line breaks aren't recognized by regex. >

Re: replaceText problem

2015-01-03 Thread Peter Haworth
I finally got replaceText working although still not sure why it returned a runtime error. I had to include "(?m)" at the start of the regex in order to to make it work in multiline mode. The "^" at the start of my regex means "start of line" but unless you are

Re: replaceText problem

2015-01-03 Thread Dr. Hawkins
On Sat, Jan 3, 2015 at 10:53 AM, Peter Haworth wrote: > Sounds like filter with the same regex would work and just set the script > to the filtered version, thanks fot the idea.. > Is there any whitespace that could occur before breakpoint other than space? that would let the simpler expression

Re: replaceText problem

2015-01-03 Thread Peter Haworth
That would work fine for me since I don't recall ever having anything else on a line that has a breakpoint. I actually hardly ever use that command anyway, only in the circumstances where a red dot breakpoint doesn't trigger which, as others have mentioned, does happen sometimes. Pete lcSQL Softw

Re: replaceText problem

2015-01-03 Thread J. Landman Gay
On 1/3/2015 1:06 PM, Peter M. Brigham wrote: Well, you actually can do this: if the shiftkey is down then breakpoint Whether you should is another matter. Oh right. So instead of my other suggestion: filter tScript without "*breakpoint*" It will destroy any lines that incorporate semic

Re: replaceText problem

2015-01-03 Thread J. Landman Gay
On 1/3/2015 12:53 PM, Peter Haworth wrote: I didn't know breakpoint was always on a line by itself - so you can't have another command on the same line separated by a comma? Kinda moot anyway since I'd never do that and this will only ever be working on my scripts. Well, there could be a comme

Re: replaceText problem

2015-01-03 Thread Peter M. Brigham
On Jan 3, 2015, at 1:36 PM, J. Landman Gay wrote: > On 1/3/2015 11:35 AM, Peter Haworth wrote: >> It's part of a script I use to get a product ready for release. I'm >> already calling revDebuggerClearAllBreakpoints (which I think is what is >> called when you select the Clear All Breakpoints men

Re: replaceText problem

2015-01-03 Thread Peter Haworth
I may have to go that route since I just can't get replaceText to work. I didn't know breakpoint was always on a line by itself - so you can't have another command on the same line separated by a comma? Kinda moot anyway since I'd never do that and this will only ever be w

Re: replaceText problem

2015-01-03 Thread J. Landman Gay
On 1/3/2015 11:35 AM, Peter Haworth wrote: It's part of a script I use to get a product ready for release. I'm already calling revDebuggerClearAllBreakpoints (which I think is what is called when you select the Clear All Breakpoints menu option) but I think that only clears red dot breakpoints n

Re: replaceText problem

2015-01-03 Thread Peter Haworth
Hi Jacque, It's part of a script I use to get a product ready for release. I'm already calling revDebuggerClearAllBreakpoints (which I think is what is called when you select the Clear All Breakpoints menu option) but I think that only clears red dot breakpoints not breakpoint commands. Looking i

Re: replaceText problem

2015-01-03 Thread Dr. Hawkins
On Fri, Jan 2, 2015 at 7:41 PM, J. Landman Gay wrote: > Is this for your own use, or for a utility? The capability is already > built into the debugger -- just choose "Clear all breakpoints" from the > Debug menu. It removes all breakpoints from all scripts in all open stacks. He's searching fo

Re: replaceText problem

2015-01-02 Thread J. Landman Gay
On 1/2/2015 8:41 PM, Peter Haworth wrote: I'm adding a check for breakpoint commands to my build procedures. Basically check through the command of every script and issue the following command: Is this for your own use, or for a utility? The capability is already built into the debugger -- jus

replaceText problem

2015-01-02 Thread Peter Haworth
I'm adding a check for breakpoint commands to my build procedures. Basically check through the command of every script and issue the following command: replaceText(pScript,"(^\s*breakpoint$"," ") It looks for some number of space at the start of a line, followed by the

Re: replaceText() not working as expected for multiple lines

2014-09-21 Thread Peter M. Brigham
kyDrive\///'") into tDat > > On Sat, Sep 20, 2014 at 3:46 PM, Peter Haworth wrote: > >> You might try (?m) to switch on multiline mode at the start of your regex. >> I'm pretty sure that won't work though. LC makes you use a repeat loop to >&g

Re: replaceText() not working as expected for multiple lines

2014-09-21 Thread Thierry Douez
mode, just have to do what Peter said: add (?m) as a prefix of your regex. > so you could use a repeat loop Don't need any repeat loop with replaceText(). > or just don't use the ^. > > If I put… > > /Users/hawk/bk_clients/blue aardvark/blue_aardvark001

Re: replaceText() not working as expected for multiple lines

2014-09-20 Thread Paul Hibbert
est5/test5001.dhbk …into a variable tVar and use… put replaceText(tVar,"/Users/hawk/bk_clients/",empty) into tVarOut …then tVarOut contains: blue aardvark/blue_aardvark001.dhbk pink panther/pink_panther_001.dhbk super chicken/super_chicken005.dhbk test5/t

Re: replaceText() not working as expected for multiple lines

2014-09-20 Thread Mike Bonner
PM, Peter Haworth wrote: > You might try (?m) to switch on multiline mode at the start of your regex. > I'm pretty sure that won't work though. LC makes you use a repeat loop to > go through each line and issue the replaceText() against each one. > > Hope that Thierry chime

Re: replaceText() not working as expected for multiple lines

2014-09-20 Thread Peter Haworth
You might try (?m) to switch on multiline mode at the start of your regex. I'm pretty sure that won't work though. LC makes you use a repeat loop to go through each line and issue the replaceText() against each one. Hope that Thierry chimes in with a workaround for this - he's th

replaceText() not working as expected for multiple lines

2014-09-20 Thread Dr. Hawkins
shell command and ls on OSX Using replaceText() to replace ^/Users/hawk/bk_clients/ with empty, I get blue aardvark/blue_aardvark001.dhbk /Users/hawk/bk_clients/pink panther/pink_panther_001.dhbk /Users/hawk/bk_clients/super chicken/super_chicken005.dhbk /Users/hawk/bk_clients/test5

Re: Triggers, performance and help with a replaceText script with start and end text matches

2013-07-06 Thread Peter M. Brigham
On Jul 6, 2013, at 8:05 PM, Mark Rauterkus wrote: > Desired result is to remove all the text starting with "Prior data:" and > ending with "Concludes prior." put fld "performance" into tText put offset("Prior data: ", tText) into startChar put offset("Concludes prior.",tText) + 15 into endChar pu

Triggers, performance and help with a replaceText script with start and end text matches

2013-07-06 Thread Mark Rauterkus
t OpenCard. Getting there I need to do some text magic in the trigger buttons with text. Works: (but only does a fraction of what I want it to do) on mouseUp, tPerformance put the text of field "field1" into tPerformance put replaceText(tPerformance, "Prior", "hello&quo

Re: replaceText

2012-06-13 Thread Richmond
Thanks both: Mark and Igor. On 06/13/2012 12:35 PM, Mark Schonewille wrote: Hi Richmond, ReplaceText is a function, not a command and you can't replace anything in a literal but only in a container. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engine

Re: replaceText

2012-06-13 Thread Mark Schonewille
Hi Richmond, ReplaceText is a function, not a command and you can't replace anything in a literal but only in a container. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogramme

Re: replaceText

2012-06-13 Thread Igor de Oliveira Couto
Hmm, let me see if I understand you correctly: On 13/06/2012, at 7:19 PM, Richmond wrote: > put fld "TEXXT" into TEXXT > if TEXXT contains "sugar" then >replaceText ("sugar","sugar","sweetener") > end if > put TEXXT into fld &

replaceText

2012-06-13 Thread Richmond
put fld "TEXXT" into TEXXT if TEXXT contains "sugar" then replaceText ("sugar","sugar","sweetener") end if put TEXXT into fld "TEXXT" doesn't work. The dictionary entry does NOT say something like this: replaceText TEXXT