Test, validate and match regular expressions
Matches any single character that is followed by at least 4 more characters before the end of a line. With the global and multiline flags, it effectively matches every character on each line except the last four. Commonly used in find-and-replace operations to mask or strip all but the final 4 characters, such as revealing only the last 4 digits of a card or account number.