I'm relaxing by coding. Don't do this so much these days. I had noticed today's run stats post (isn't it nice to have the running back on there again?) had been tagged with years, because there were numbers in there that looked like years. Time to update the regular expression that identifies years in posts. HHow's this beast then?
(?!\d\d\d\d( steps| days|,\d\d\d|/|\" ))\b(15|16|17|18|19|20)(\d\d)\b(?<!(translate\(|\d\d\d,|\w=\"-?)\d\d\d\d)
So that identifies any year from the 1500s into the 2000s, unless it is followed by steps, days, a comma and another number, a forward slash, or double quotes, or preceded by translate(, another number and a comma, or looks to be part of an attribute, like x="2000"...
Fascinating stuff.
Still very windy.
52Kph winds and heavy rain, 10 - 13℃.
⬅️ Storm is back again today :: Tree in the back garden is definitely leaning more ➡️
Paulʼs weblog - I live in A sleepy town, Kent. Wed + dad to two, I am a full stack web engineer, + I do js / node, some ruby, python, php etc. My hobbies are pubbing, parkrun, eating, home automation 🤖 + other diy jiggery-pokery, history, family tree stuff, telly, squirrels, pirates, lego, and time travel.
Yep, deliberately unstyled.