View Single Post
Old 01-10-2022, 01:34 PM   #4
Varo
Junior Member
Varo began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2022
Device: Galaxy S9+
Quote:
Originally Posted by kovidgoyal View Post
the regex runs on unicode not bytes. You want to use \uXXXX for unicode characters
Quote:
Originally Posted by theducks View Post
Just capture each character type group and don't use that group in the replace

If you want to capture reserved symbols, they must be escaped:
Code:
(\[foo, bar\])
Replacements do not need to be in the order captured.
\2 - \5 - \1 (notice that I did not use \3 or \4)

Thank you very much. Combining advice from the both of you I achieved my goal with this:
Code:
{series: re([^\u0000-\u007F]+|[\u005B-\u005D]+, )}
Varo is offline   Reply With Quote