Js gets the regular expression of the ua number

var str = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) hybrid/2.1.5 parent Version/11.0 Mobile/15A372 Safari/604.1"
// hybrid/1.1.5 parent parent 1.1.5

regular do not know how to match, big face when the hand of the party, thank you

Dec.29,2021

hybrid\ / (\ d +\.?) *\ s.* (? = Version)
match begins with hybrid/ string
any number . combination
string ending with Version


Menu