Test, validate and match regular expressions
Matches unquoted (bare) keys in JavaScript-style object literals so they can be wrapped in double quotes, converting loose JS hashes into strict JSON for JSONP use. Group 1 captures the preceding whitespace/bracket/comma, group 2 grabs the bare key while a negative lookahead skips numbers and true/false literals, and group 3 captures the following delimiter like a colon or comma. Typically used with a replacement such as $1"$2"$3 during JSON sanitization or JSONP parsing.