On 23/02/2016 21:59, Stephen MacLean wrote:
Hi All,

Working to build a library extension and I’m getting an error on this line when 
I go to test it in LCB:

put "^[A-Z0-9._%+-]{1,64}@(?:[A-Z0-9-]{1,63}\.){1,125}[A-Z]{2,63}$" into tRegex

The error is:

illegal escape in string 
'^[A-Z0-9._%+-]{1,64}@(?:[A-Z0-9-]{1,63}\.){1,125}[A-Z]{2,63}$’

Hi Stephen,

In LiveCode Builder, quoted strings treat the '\' character as an escape character. It's explained in the LiveCode Builder Language Reference guide.

So, you need to replace your '\' with '\\', and everything should work nicely for you.

                                            Peter

--
Dr Peter Brett <peter.br...@livecode.com>
LiveCode Open Source Team

LiveCode 2016 Conference https://livecode.com/edinburgh-2016/

_______________________________________________
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