filmov
tv
Introducing the new REGEX function set in Excel

Показать описание
Regular expressions are now possible in Excel thanks to a new set of functions!
The REGEX function set includes REGEXTEST, REGEXEXTRACT, and REGEXREPLACE.
These provide you with a flexible and versatile way to construct special sequences to search and manipulate text.
However, all three are only available to Microsoft 365 Insiders on the Beta Channel at the time of writing.
𝗥𝗘𝗚𝗘𝗫𝗧𝗘𝗦𝗧
Checks if the supplied text matches a regex pattern and returns TRUE or FALSE.
For example, =REGEXTEST(A3:A12,"[0-9]") returns TRUE for the codes that contain a number and FALSE if not.
Likewise, =REGEXTEST(A3:A12,"[a-zA-Z]") does the same for those that have an alphabetic character.
𝗥𝗘𝗚𝗘𝗫𝗘𝗫𝗧𝗥𝗔𝗖𝗧
Extracts one or more parts of the supplied text that match a regex pattern.
For example, the following extracts the email address from each text string:
=REGEXEXTRACT(A3:A12,"[\w\.-]+@[\w\.-]+\.\w+")
𝗥𝗘𝗚𝗘𝗫𝗥𝗘𝗣𝗟𝗔𝗖𝗘
Searches for a regex pattern within supplied text and replaces it with different text.
For example, to mask the first four characters of a set of account numbers with asterisks, use the following:
=REGEXREPLACE(A3:A12,"^(\d{4})","****")
Some of these regex patterns may look tricky to grasp, but your best friend is ChatGPT. Ask what you're trying to do, and it'll invariably generate a reliable solution!
✄---
#exceleration #excel #globalexcelsummit
---
The Global Excel Summit is the world's largest gathering of Microsoft Excel users and experts.
Find us on:
The REGEX function set includes REGEXTEST, REGEXEXTRACT, and REGEXREPLACE.
These provide you with a flexible and versatile way to construct special sequences to search and manipulate text.
However, all three are only available to Microsoft 365 Insiders on the Beta Channel at the time of writing.
𝗥𝗘𝗚𝗘𝗫𝗧𝗘𝗦𝗧
Checks if the supplied text matches a regex pattern and returns TRUE or FALSE.
For example, =REGEXTEST(A3:A12,"[0-9]") returns TRUE for the codes that contain a number and FALSE if not.
Likewise, =REGEXTEST(A3:A12,"[a-zA-Z]") does the same for those that have an alphabetic character.
𝗥𝗘𝗚𝗘𝗫𝗘𝗫𝗧𝗥𝗔𝗖𝗧
Extracts one or more parts of the supplied text that match a regex pattern.
For example, the following extracts the email address from each text string:
=REGEXEXTRACT(A3:A12,"[\w\.-]+@[\w\.-]+\.\w+")
𝗥𝗘𝗚𝗘𝗫𝗥𝗘𝗣𝗟𝗔𝗖𝗘
Searches for a regex pattern within supplied text and replaces it with different text.
For example, to mask the first four characters of a set of account numbers with asterisks, use the following:
=REGEXREPLACE(A3:A12,"^(\d{4})","****")
Some of these regex patterns may look tricky to grasp, but your best friend is ChatGPT. Ask what you're trying to do, and it'll invariably generate a reliable solution!
✄---
#exceleration #excel #globalexcelsummit
---
The Global Excel Summit is the world's largest gathering of Microsoft Excel users and experts.
Find us on:
Комментарии