REGEXP_FULL_MATCH() returns true when a regular expression matches a whole string, from its first character to its last, and false when it does not. Use it to check that a value has the format it should: a tax ID of two digits, a hyphen and seven digits, or an invoice number of a fixed shape. To test for a match anywhere in the value, use REGEXP_MATCHES().
REGEXP_FULL_MATCH(string, pattern [, options]) REGEXP_FULL_MATCH() returns a boolean value
// The whole string has to fit the pattern
REGEXP_FULL_MATCH('INV-00417', 'INV-[0-9]{5}') = true
REGEXP_FULL_MATCH('INV-00417x', 'INV-[0-9]{5}') = false
// A part that matches is not enough
REGEXP_FULL_MATCH('abc123', '[a-z]+') = false
REGEXP_FULL_MATCH('abc123', '[a-z]+[0-9]+') = true
// Any alternative that fits the whole string will do
REGEXP_FULL_MATCH('ab', 'a|ab') = true
// Ignoring case
REGEXP_FULL_MATCH('ABC', 'abc', 'i') = true
^ before it and $ after it.(?i) at the start of the pattern ignores case, and so does 'i' as the third argument. The option 's' lets a dot match a line break.\d, \w and \s stand for a digit, a letter, digit or underscore, and a blank, of the unaccented alphabet.