Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular Expression to replace text in Tags field? (Zerochan) #4315

Closed
KonoVitoDa opened this issue Jul 18, 2023 · 0 comments · Fixed by #4319
Closed

Regular Expression to replace text in Tags field? (Zerochan) #4315

KonoVitoDa opened this issue Jul 18, 2023 · 0 comments · Fixed by #4319

Comments

@KonoVitoDa
Copy link

KonoVitoDa commented Jul 18, 2023

Zerochan's Tags follow the pattern:

tags[N]
   0 Mangaka" style="width: 22px; :-->
        Kokokashira
   1 Series,Game" style="width: 22px; :-->
        Kirby Series
   2 Character" style="width: 22px; :-->

Source

I'd like to remove all the text until \" style=\"width: 22px; :-->\n . I'm currently using:
{tags:J | #R\" style=\"width: 22px; :-->\n ##RMangaka##RStudio##RGame##RSeries##RArtbook##RMovie##ROVA##RVisual Novel##RAmbiguous##RCharacter##RVTuber##RTheme##RSource##RCharacter Group##RMeta##}
Where # is my format-separator. But since this prefix varies a lot, as you can see on the above example, which has a Series,Game field, I'd like to just securely remove all these unnecessary prefixes and let only the actual tags.
Btw, it's for my Exiftool postprocessor.

EDIT:
I upgraded the replacement command to:
{tags:J | #R=\"width: 22px; :-->\n ##RMangaka\" style##RStudio\" style##RGame\" style##RSeries\" style##RArtbook\" style##RMovie\" style##ROVA\" style##RVisual Novel\" style##RAmbiguous\" style##RCharacter\" style##RVTuber\" style##RTheme\" style##RSource\" style##RCharacter Group\" style##RMeta\" style##RMangaka,##RStudio,##RGame,##RSeries,##RArtbook,##RMovie,##ROVA,##RVisual Novel,##RAmbiguous,##RCharacter,##RVTuber,##RTheme,##RSource,##RCharacter Group,##RMeta,##}"
Is it good enough? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants