1

I have this string : "397"

The special character has the code point : 1114111

When I chunk the string : "397".match(/.{2}/g)

I have this result : ['3\uDBFF', '\uDFFF9']

But I want this result : ['3', '97']

Thanks

mbourd
  • 35
  • 4

1 Answers1

1

you should try this:

"397".match(/.{2}/gu)
Pvria Ansari
  • 406
  • 4
  • 20