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 many roads Mountain high, river wide So many roads to ride So many roads So many roads (in LiveCode) Cheers David G > On 10 Jun 2021, at 9:10 am, Richmond Mathewson via use-livecode > <use-livecode@lists.runrev.com> wrote: > > Well, at the rsik of getting things wrong, here's my attempt: > > https://forums.livecode.com/viewtopic.php?f=7&t=35951 > > Richmond. > > On Wed, Jun 9, 2021 at 8:05 PM David V Glasgow via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> LC coders, please tell me why this won’t work! My guess is that this is a >> regex issue, not LC, but I am so stuck. >> >> I want to replace all text within in parentheses (including the >> parentheses) with a single space. I have tried assembling the >> matchExpression in advance and in line, and also 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 field "import" >> >> end mouseup >> >> >> I get the less than inspiring: >> >> execution error at line 3 (Handler: can't find handler) near >> "replacetext", char 1 >> >> >> >> Best Wishes, >> >> David Glasgow >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> > > > -- > > This communication may be unlawfully collected and stored by the Agents > of a large number of governments in secret. The parties to this email do > not consent to the retrieving or storing of this communication and any > related metadata, as well as printing, copying, re-transmitting, > disseminating, or otherwise using it. If you believe you have received > this communication in error, please delete it immediately. > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode