A regular expression describes a text pattern. Sheets has three functions for them:
REGEXMATCH(text, pattern) returns TRUE if the pattern appears anywhere in the text.
REGEXEXTRACT(text, pattern) returns the first piece that matches. Put part of the pattern in brackets, a capture group, and only that part comes back.
REGEXREPLACE(text, pattern, replacement) replaces every match.
A few symbols do most of the work: \d is a digit, + means one or more, . is any character, ^ and $ are the start and the end, | means or, and [^0-9] is any character that isn't a digit. Patterns tell upper and lower case apart; start with (?i) to ignore case.
Two Sheets details: these functions only take text, so a number cell gives #VALUE! until you turn it into text with A2&"". And REGEXEXTRACT returns text, even when it extracts digits; wrap it in VALUE if you need a number. When nothing matches, REGEXEXTRACT gives #N/A, which IFNA can catch.