View Single Post
Old 01-10-2022, 09:48 AM   #1
Varo
Junior Member
Varo began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2022
Device: Galaxy S9+
Regex expression to edit series when saving books to disk not working.

Hello,

All my series have non-english characters in them and the english part is enclosed by square brackets.

Example of a series name: 魔法科高校の劣等生 [Mahouka Koukou no Rettousei]

I want to be able to change this using the template and only have the english part of the series name like this: Mahouka Koukou no Rettousei

Towards that end I tried using this:

Code:
{series:re('[^\x00-\x7F]+', '')}/{title}
It would replace all non english characters with nothing. However it does not seem to work. Additionally, if I try to also remove the square brackets in the regex expression like this:

Code:
{series:re('[^\x00-\x7F]+|\[|\]', '')}/{title}
I get an invalid format specifier error eventhough the regex exp should be fine.

Any help would be really appreciated.
Varo is offline   Reply With Quote