ReplaceAll function takes quite a while

Hi everyone,
I am building an App which has few categories of videos. For each videos i need to save the id which is a huge number(integer) and to save it properly i need to save as string as shown below:

regex = CreateObject("roRegex", ":(\s*)([0-9]{9,})", "")
safeResult = regex.ReplaceAll(jsonstring ,":\1" + Chr(34) + "\2" + Chr(34))
result = ParseJson(safeResult)

Sometimes ReplaceAll function takes quite a while and the user is not allowed to navigate through the app.
I said sometimes because on the same “jsonstring” sometimes works fine and sometimes not, what can I do to improve this issue?

Thanks,
Marco

I am getting invalid when running this

CreateObject(“roRegex”, “Smiley Sad\s*)([0-9]{9,})”, “”)
output:
regex : invalid

Try:

x = CreateObject("roRegex", "Smiley Sad\s*\)\([0-9]{9,}\)", "")