That’s why I’m thinking you only have half the solution. As it is, and based purely on what you’ve posted, you have a regex that will very happily go “Yep, there’s a decade here! It’s at this part of the string!” but unless something else is happening in part of the code you haven’t posted, it doesn’t do anything beyond simply finding it.
Also, based on the code you’ve posted, it looks like you might be trying to edit the source directly. That is definitely one way of fixing things, but as you’ve seen, it’s not the most maintainable. I’d recommend leaving the plugin as it’s written, and just creating a script to do the same (obviously replacing each
decade with the variable the plugin actually uses):
That doesn’t handle cases where the decade is preceeded with an apostrophe ('90s), but that doesn’t sound necessary for this particular plugin and better coverage for manually-set fields isn’t worth the hassle of typing it out on my phone – by the way, someone might want to test that line.