Forum Discussion

PerrySjogren_'s avatar
PerrySjogren_
Icon for Microsoft rankMicrosoft
May 20, 2024

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

    • KanwalNo1's avatar
      KanwalNo1
      Iron Contributor
      That confused me too Sergei ! And I kept on accessing the old Blog ! Thanks for alerting the team.
    • PerrySjogren_'s avatar
      PerrySjogren_
      Icon for Microsoft rankMicrosoft
      Hi 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
  • KanwalNo1's avatar
    KanwalNo1
    Iron Contributor

    SergeiBaklan PerrySjogren_JoeMcDaid

    PeterBartholomew1

    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

    • SergeiBaklan's avatar
      SergeiBaklan
      MVP

      KanwalNo1 

      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.

      • KanwalNo1's avatar
        KanwalNo1
        Iron Contributor

        SergeiBaklan 

        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

Resources