Had a bit of trouble with what should have been a simple regex today.

I removed a whole bunch of Pages from our site today, and they were all sat under the same parent. I wanted to redirect the now missing pages to the parent. I came up with this:

^\/dignity-care-reports\/[a-z-]*(\/?)

It worked fine in that it redirected the sub-pages but the parent was now in a redirect loop. So, I headed over to regex101.com to investigate. I quickly found that, yes, this regex did match the parent URL.

The great thing about regex101 is that it gives an explanation of what each of your tokens is doing and I quickly saw:

* matches the previous token between zero and unlimited times

And there’s the problem! Now I just needed any sort of match after that second / to stop the redirect loop and a ‘+’ does the job:

^\/dignity-care-reports\/[a-z-]+(\/?)

You can see the example here: https://regex101.com/r/IfIPpn/1

Now I just need to remember that * can match zero times!

Replied to https://waterpigs.co.uk/notes/5ASGj8/ by Barnaby WaltersBarnaby Walters (waterpigs.co.uk)
I don’t often check my internet numbers, but I’m happy to see that a music video I made is at least marginally more popular that that one time I 3D printed some minecraft foxes. (And yes, I know that the foxes have a vastly higher Internet Number Per Year, but the music is the more enduring content so that’ll self-correct over time)

Those foxes are remarkably accurate!

“[Facebook] argues that sharing data with advertisers is key to giving users “better experiences”” https://t.co/3XjtR2Z89d

@gnomeweb @MicrosoftToDo nailed it. Because I am using an Outlook/Live MS account, it authenticates through http://login.live.com rather than http://login.microsoftonline.com, so I had to add http://login.live.com to the “Manage Additional URLs” list under Preferences.

@gnomeweb tried a different app and it was fine. The issue is with @MicrosoftToDo, it doesn’t seem to want me to authenticate within the site specific browser instance.

@gnomeweb oh, I see, it’s not available when installed from flatpak (and @fedora defaults to flatpak in Software).

However, even when I got it running, and ran a web app, it opened firefox to authenticate and never came back to the web app?