REGEXEXTRACT - Microsoft Excels New Regular Expression Function
ฝัง
- เผยแพร่เมื่อ 5 ต.ค. 2024
- Microsoft has recently introduced a new function within Microsoft Excel called REGEXEXTRACT() (Regular Expression).
"The REGEXEXTRACT function allows you to extract text from a string based on a supplied regular expression. You can extract the first match, all matches or capturing groups from the first match." - Microsoft
Office Newb Blog - Exercise File
www.officenewb...
How does it handle "McIntyre" or "O'Brien", or "MacCleod, Connor"? How about hyphenated names?
You can include the characters ' or - in your REGEX pattern. Something like this... =REGEXEXTRACT(A1,"[A-Za-z'-]+$")
Is this available office 2021 or MS 365 ? Can we apply also to numeric field ?
This is available in the 365 edition. Yes, this function can work with numeric data as well. “[0-9]”: any numerical digit