Test, validate and match regular expressions
Matches a comma followed by any amount of whitespace (spaces, tabs, newlines) that appears immediately before a closing curly brace or square bracket. This is the classic trailing comma pattern found at the end of JSON objects, arrays, or JavaScript collections. Typically used in a global replace operation to strip trailing commas, which strict JSON parsers reject as syntax errors.