In May 2024, Microsoft let members of the Microsoft 365 Insider program try out regular expression (regex) functions in the Excel spreadsheet apps for both Windows and Mac PCs. As Microsoft stated at the time, the new regex functions "are sequences of characters that define search patterns." They can be used to check if a string in the spreadsheet has a certain pattern, among other uses.
Today, the Microsoft 365 Insider blog announced that those users can try out some new regex modes in the Excel Windows and Mac apps for two more functions. It stated:
Now you can take advantage of regex within the existing XLOOKUP and XMATCH functions, by using the new [match_mode] = 3 and a regex pattern as the lookup_value. This will allow XLOOKUP and XMATCH to match against parts of text in a cell, or by any other pattern of text that can be described with regex.
When using the regex modes, Microsoft says certain symbols, which it labels as "tokens" that can match a large number of characters. Some of the common tokens that Excel users can try out include the following:
- “[0-9]”: any numerical digit
- “[a-z]”: a character in the range of a to z
- “.”: any character
- “a”: the “a” character
- “a*”: zero or more “a”
- “a+”: one or more “a”
Microsoft says if you cannot find a token to use for your regex functions, you can type in a text prompt in Copilot and see if its generative AI can come up with the tokens you need.
Members of the Microsoft 365 Insider program in the Beta channel can try out the new regex functions now. Windows users will need to have Version 2408 (Build 17931.20000) installed, while Mac users will have to have Version 16.89 (Build 24080715) installed. There"s no word on when these new Excel regex functions will become generally available for all users of the spreadsheet app.