In this tutorial you'll learn how to create regular expressions using NSRegularExpression, and how to match a variety of regular expressions using the most important syntax. It's an extremely fast and efficient way to search and replace complex text tens of thousands of times, and it's all available for Swift developers to use. Apple provides support for regular expressions on all of its platforms – iOS, macOS, tvOS, and even watchOS – all using the same class, NSRegularExpression. Regular expressions allow us to run complex search and replace operations across thousands of text files in just a handful of seconds, so it’s no surprise they have been popular for over 50 years.