Quote:
Originally Posted by JimmXinu
I haven't tested it, but something like this maybe?
Code:
characters,ships,ships_CHARS=>(?i)(Adrien Agreste)?( \| )?(Chat Noir)?=>Adrien
|
Be careful, in my experience, this should also pick up the places where there are strings of 'nothing' so, for example, 'zzz' would become something like 'AdrienzAdrienzAdrienzAdrien', because every part is rendered optional by the '?'
Code:
characters,ships,ships_CHARS=>(?i)^Adrien Agreste \| Chat Noir$|^Adrien Agreste$|^Chat Noir$=>Adrien
or
Code:
characters=>(?i).*Adrien Agreste.*|.*Chat Noir.*=>Adrien
Would be better solutions.
| without the '\' is an 'OR' which means that it will match any of the options on either side if it detect them.
^ and $ match the beginning and the end of a tag, this solution wouldn't match anything else than the three tags 'Adrien Agreste \| Chat Noir', 'Adrien Agreste' and 'Chat Noir'.
.* will match any and all characters before and after the names, which means that both '.*Adrien Agreste.*' and '.*Chat Noir.*' should match the full canonical tag and respectively match any character tag that contains those words.
You shouldn't use that with the ships though because it will match the whole ship tag, not just one side of the '/'.
Use
Code:
characters,ships,ships_CHARS=>(?i)[^\/&]*Adrien Agreste[^\/&]*|[^\/&]*Chat Noir[^\/&]*=>Adrien
If you want to also apply the second solution to the ships metadata.
[^\/&]* will match any and all characters that aren't '/' or '&'. The 'amp;' part is here for FFF to recognize that it is a '&' and not a special character, leaving it out will result in bugs in FFF's code.