Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
REGEXEXTRACT searches a text string for the first match of a regular expression and returns that matched portion. It is a Google Sheets-exclusive function used for advanced text parsing tasks such as extracting phone numbers, dates, codes, or any patterned substring from unstructured text.
=MID(A2,MIN(FIND({"0","1","2","3","4","5","6","7","8","9"},A2&"0123456789")),LEN(A2))=REGEXEXTRACT(A2,"\d+")Computed by a real spreadsheet engine on the sample data below.
| Text | Extracted Number |
| Order #1042 shipped | 1042 |
| Invoice 2055 due | 2055 |
| Ref 309 pending | 309 |
| Item 7 in stock | 7 |
=MID(A2,MIN(FIND({"0","1","2","3","4","5","6","7","8","9"},A2&"0123456789")),LEN(A2))→042 shipped
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: