Test, validate and match regular expressions
This regular expression matches any digit that is not among the last four characters of a string. It is primarily used to mask sensitive information, such as credit card numbers, by matching all digits except the final four. When used in a replace function, it effectively hides the majority of the numerical string while leaving the last four digits visible for identification purposes.