Test, validate and match regular expressions
This regular expression matches Malaysian identity card numbers, commonly known as MyKad. It validates the standard 12-digit format which encodes the holder's birthdate (YYMMDD) followed by a 6-digit suffix. The pattern is flexible and allows optional spaces or hyphens between the date components and the serial number, making it useful for cleaning or validating user input in forms.