Quote:
Originally Posted by ownedbycats
Regex issues again 
|
I suspect it's a space after the 2. You're stripping
- Fandom leaving
Mass Effect 2_(underscore for space) which doesn't match '
^Mass Effect \d$'.
By the time it gets to final output, the trailing space has been removed, but it's still there during processing.
I haven't tested it beyond the two fics given above, but I'd try something like this as a replacement for your first line. But it does remove a few additional things you didn't before, '(Movie)' and '(Movies)' for example, not just '(Movie 5)' or '- Fandom(Movies)'
Code:
## Everything you want to remove that comes in ( ) at the end of a category
## with optional spaces around the '(' ')' characters
category=>[ ]*\([ ]*([0-9]+|Video[ ]*Games?|Movies?[ ]*[0-9]*|Comics|TV)[ ]*\)[ ]*$=>
category=>[ ]*-[ ]*Fandom[ ]*$=>
Or just add
[ ]* in front of
- Fandom. I'd use it instead of most or all of the spaces just because you never know when an AO3 author will have spaces or not.