I run a script and I get:
Failed to execute Action “Script”: Unable to complete execution because CPU limit of 1000 ms exceeded
Is there a way to get more runtime? Here is the script:
https://github.com/QuaCau-TheSphere/script-le/blob/main/Quản%20lý%20tài%20chính%20bằng%20tiếng%20Việt%20tự%20nhiên%20trên%20Fibery.js
I figure out that it’s because I have a regex test for strings containing unicode characters. In particular /đ\b/
doesn’t match đ
. To solve this I replace /đ\b/
with /đ(?=$|\P{L})/u
. But this runs very slow. At the end of the day I use this workaround:
input = input + ' '
var regex = new RegExp(word + ' ', 'gi');
const test = regex.test(input)
However I’m still interested to know the answer of the question in the title.