Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(((\w\d+|\w+)(\W+)?)?(\s+)?(U;)?(\s+)?(CrOS|Cross|CrossOS))(\s+)(x86_64|x8664|x86_x64|armv\d+|aarch\d+|i\d+|amd64)
/
gmi

Description

Regex matches Chrome OS user agents. Tested against 4.5k apache log lines.

By Dennis Faas https://www.infopackets.com

Submitted by anonymous - 2 years ago