REGEX functions practice in Google Sheets
Find, pull out and replace patterns in text with REGEXMATCH, REGEXEXTRACT and REGEXREPLACE.
- 1Test text with REGEXMATCHIn B2, use REGEXMATCH to check whether the note in A2 contains a number. The pattern \d+ means one or more digits.
- 2Pull out a number with REGEXEXTRACTPremiumIn B2, use REGEXEXTRACT to pull the order number out of the note in A2. Use the pattern \d+.
- 3Keep only digits with REGEXREPLACEPremiumIn B2, use REGEXREPLACE to remove everything from A2 that is not a digit. \D (capital D) means any character that is not a digit.