Replacetext of any characters between parentheses with a space

David V Glasgow dvglasgow at gmail.com
Wed Jun 9 13:03:25 EDT 2021


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




More information about the use-livecode mailing list