Test, validate and match regular expressions
This regex matches JSON snippets containing an 'error' or 'errors' key, where the value starts with an object or array of objects, and captures content up to the 'errorParameters' field. It is useful for extracting error details from API response bodies, especially when you need to locate the errorParameters sub-object. The pattern handles both single-object and array-of-objects formats.