Regular Expressions 101

Community Patterns

Modern Chrome User Agent

1

Regular Expression
PCRE (PHP <7.3)

`
(^|\s)Chrome\s*/\s*(6[7-9]|[7-9][0-9]|\d{3,})(\.|\s|$)
`

Description

Detects modern Chromium-based browsers

  • Chrome >= 67
  • YaBrowser >= 18.7
  • Opera >= 54
  • Samsung Internet >= 9.2
  • Edge >= 44.18362.1.0

These browsers need only 20.33 KB of corej.js polyfills.

Submitted by slavafomin - 4 years ago