Networkingflags: g

HTTP Status Code

Match 3-digit HTTP status codes in the 1xx–5xx range.

Try it in RegexPro

Pattern

regexJavaScript
/\b[1-5]\d{2}\b/g

Raw source: \b[1-5]\d{2}\b

How it works

Leading digit 1–5 covers all standard class codes (informational, success, redirect, client error, server error), followed by any two digits. Word boundaries prevent partial matches.

Examples

Input

HTTP 200 OK

Matches

  • 200

Input

Returned 404, then 500

Matches

  • 404
  • 500

Input

no codes here

No match

Common use cases

  • Access log parsing
  • Error rate dashboarding
  • API test report aggregation
  • Monitoring alerts on 5xx spikes

Related concepts