Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

`
(\s|^)AppleWebKit/[\d\.]+\s+\(.+\)\s+Version/(1[0-9]|[2-9][0-9]|\d{3,})(\.|$|\s)
`
i

Description

Detects modern Safari versions by User Agent string

  • Safari & iOS Safari >= 10

These browsers require ~62 KB of core-js polyfills.

Submitted by slavafomin - 5 years ago