Build, test, and debug regular expressions
Matches trailing commas immediately preceding a closing square bracket ] or closing parenthesis ), optionally separated by newlines or whitespace. Commonly used to detect invalid trailing commas in JSON, JavaScript arrays/objects, or function calls—helpful for linting, syntax error detection, and code cleanup. Note: the character class [\n|\s] also matches literal pipe characters, likely an unintended artifact.