> On Feb 24, 2016, at 3:49 PM, Stephen MacLean <smacl...@madmansoft.com> wrote:
> 
> 
>> On Feb 24, 2016, at 1:50 PM, Peter TB Brett <peter.br...@livecode.com> wrote:
>> 
>> On 24/02/2016 18:40, Stephen MacLean wrote:
>> 
>>> Now, calling the function, I get the error:
>>> 
>>> execution error at line 4 (extension: error occured with domain) near 
>>> "runtime", char 8
>> 
>> This error is caused by an error thrown from "execute script".  Usually LCB 
>> errors are a bit more useful.
>> 
>>> [snip]
>>> 
>>> I have the extension of GitHub:
>>> 
>>> https://github.com/renegadesteve/rsIsValid/blob/development/rsIsValid.01.lcb
>>>  
>>> <https://github.com/renegadesteve/rsIsValid/blob/development/rsIsValid.01.lcb>
>> 
>> You need to make sure that the e-mail address and regular expression are 
>> surrounded by quotes when constructing your script.
>> 
>>                                  Peter
> 
> 
> I changed it to:
> 
> put "^[A-Z0-9._%+-]{1,64}@(?:[A-Z0-9-]{1,63}\\.){1,125}[A-Z]{2,63}$" into 
> tRegex
> put "filter \q" & pEmail & "\q with regex pattern \q" & tRegex & "\q into 
> tMatch" into tScript
> 
> And am still getting the same error. Sorry, I’m not sure what I’m missing 
> here.
> 

Ok, as I thought, I am dense!

Last line needs to be:

put "filter \q" & pEmail & "\q with regex pattern \q" & tRegex & "\q into 
tMatch;return tMatch" into tScript

You need to return the result to the extension, DUH!

Thanks for the help Peter!

Steve



_______________________________________________
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

Reply via email to