Quote:
Originally Posted by edeniz
...
Anyway, tl;dr:
Does using ^$ in ships make the splitting of ships2chars impossible? (Has it always been so and I've just not noticed?) Or is it just me? Just so I know if I need to go over my ini and replace those with another regex.
|
This works perfectly well for me with that story:
Code:
[archiveofourown.org]
add_to_extra_valid_entries:,ships2chars
include_in_ships2chars:ships.NOREPL
# NOREPL prevents any ships patterns from being applied to ships2chars.
add_to_replace_metadata:
# ships=>(.*)\/^Rodney McKay$=>Rodney McKay/\1
# is never going to work because the '^' is misplaced
# I suggest this to get versions w/ & w/o spaces:
ships=>^([^/&]+)[ ]*/[ ]*Rodney McKay$=>Rodney McKay/\1
ships2chars=>[ ]*/[ ]*=>/
ships2chars=>[ ]*&[ ]*=>/
ships2chars=>([^/]+)/([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3\,\4
ships2chars=>([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3
ships2chars=>([^/]+)/(.+)=>\1\,\2
include_in_characters:characters,ships2chars
When things don't work
sometimes I would look first for spaces that your patterns don't include, then differences in spelling, capitalization, etc.
Nitpick: You don't need to escape '/'s in the regexp patterns. So you can use just '/' vs '\/'. OTOH, I it doesn't hurt anything.