Knowledge base

OsMajor

Description

Extract operating system major version from user agent string, based on ua_parser.

Syntax

OsMajor(user_agent_string)

Examples

OsMajor('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36') returns '10'

Return value datatype

string

Notes

Returns null if Os major version can't be extracted from string.

Impact of null value

If input is null, returns null.