(multi-reply)
@misydia,
replace_metadata is a very versatile tool for making many kinds of changes.
It relies on
regular expressions(regexp or re) and while regexp is usually common knowledge among computer scientists and programmers, is not intuitive to everyone.
The particular cases you mention are fairly simple in theory, but quickly get complicated when you realize that AO3 lets any author enter anything they want. For example, you'll likely want at least:
Code:
[archiveofourown.org]
replace_metadata:
freeformtags=>^[Aa]lternate[ ]*[Uu]niverse[ :-]+(.*)$=>\1\sAU
freeformtags=>[ ]+au$=>\sAU
That first regexp means:
^ = beginning of tag
[Aa]lternate =
Alternate or
alternate
[ ]* = zero or more spaces
[Uu]niverse =
Universe or
universe
[ :-]+ = one or more spaces, colons and/or dashes
(.*) = zero or more of any characters, grouped for later use
$ = end of tag
And the replacement string means:
\1 = the first paran group from the regexp
\sAU = [space]AU (\s is only in replacement strings, it's FFF specific, not normal regexp.)
Many other users have asked before about trying to normalize AO3 tags. Some have built up substantial personal.ini libraries of
replace_metadata settings. But it's never going to be perfect for all stories as long as AO3 allows completely free form tags.
Additional Reading:
FFF Wiki page ReplaceMetadata (and other pages in the wiki)
@DarkMagda,
Check this
FAQ, it will probably help.