Forum Discussion
New Regular expression (Regex) functions in Excel
Hi, Microsoft, 365 Insiders!
Calling all Excel enthusiasts! We're excited to introduce three new functions that use Regular Expressions to help parse text more easily: REGEXTEST, REGEXEXTRACT, and REGEXREPLACE.
Jake Armstrong, Product Manager on the Excel team, takes a look at and shares insights on each powerful function in our latest blog: New Regular expression (Regex) functions in Excel
Thanks,
Perry
Perry Sjogren
Microsoft 365 Insider Social Media Manager
Become a Microsoft 365 Insider and gain exclusive access to new features and help shape the future of Microsoft 365. Join Now: Windows | Mac | iOS | Android
Why wasn't this blog duplicated in Excel blogs in this resources? Now all discussions related to that new functionality are in comments to 2-years old blog https://techcommunity.microsoft.com/t5/excel-blog/announcing-new-text-and-array-functions/ba-p/3186066/page/6#comments. Or went out of MTC.
- KanwalNo1Iron ContributorThat confused me too Sergei ! And I kept on accessing the old Blog ! Thanks for alerting the team.
- PerrySjogren_MicrosoftHi Sergei,
Thank you for your note. We aim to keep our community well-informed and engaged with the latest updates.
We appreciate your vigilance in ensuring that discussions about new features are easily accessible and centralized. I will forward your feedback to the relevant team.
Thanks again for your contribution to the Microsoft Tech Community!
Have a wonderful weekend!
Perry Sjogren
Microsoft 365 Insider Social Media Manager
- KanwalNo1Iron Contributor
SergeiBaklan PerrySjogren_JoeMcDaid
Hi Perry / Jake
Why not introduce a RegexPattern function which can refer a cell and tell us the Regex pattern used there. It can work like CHAR() and CODE() works. One can find the regex pattern of the text to be found and then use that pattern in other Regex functions to get the desired results.
Kanwaljit
But used pattern is not hided. It is within the cell, or text within REGEX..., or returned by some function. In any case it's available.
- KanwalNo1Iron Contributor
The actual purpose of such a function is to find the Regular Expression which need to used to get the format like that.
E.g., RegexExtract(B2, "[A-z]+ [A-z]+",1) is required to find the name Sonia Rees from text given in Cell B2
What RegexPattern() intends to do is that If I Type Sonia Rees in Cell B1 and then use the formula RegexPattern(B1) in Cell C1, it gives me the Result "[A-z]+ [A-z]+"
Here any non-technical person can make use of the Other Regex functions efficiently because we don't even have to search anywhere else for the pattern expressions.
Just Like =CODE("x") gives us the value 120 and we can use =Char(120) to generate x
Regards
Kanwaljit