Meet Swift Regex (WWDC 2022)

I saw the WWDC video, so you don’t have to

Steven Curtis
4 min readJul 4, 2022
Photo by JJ Ying on Unsplash

Here’s a video I’ve just seen from WWDC, here are the highlights and, in the conclusion, what I think of it. So you don’t have to watch it (if you don’t want). If you do, please watch the video in the Apple developer portal rather than reading this article as this is really just my notes from that video.

There’s nothing more to say, so let’s get started with this exploration!

Background

I’ve used Regular Expressions a few times in my development career.

It hasn’t always been fun.

What is this? A number of String instances that need to be processed? I think we’ve all been there, and it’s not always been a pretty result.

The situation

Dates are always an issue. I’m from the UK (so in other parts of the world, across the Atlantic Ocean you may be slightly confused at this complaint OK).

04/07/2022

The question is this: what does that mean?

The 4th July? The 7th April? Without clarity over the format you’re in trouble here. Guessing isn’t an option for important data or financial transactions (and for, software developers, should not be in option in any case).

--

--