Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
HTTP\/\d*.\d*\s.*\sCache-Control:\s.*\s[^\{.\}]*
/

Description

HTTP/1.0 404 Not Found Cache-Control: no-cache Content-Type: application/json

{"validation_message":'...'}

will return:

{"validation_message":'...'}

which can then be turned into a JSON object.

Submitted by John B. - 9 years ago