DamonOehlman / detect-browser

Unpack a browser type and version from the useragent string
MIT License
687 stars 102 forks source link

Opera browser is not detected #158

Closed SilantiFross closed 8 months ago

SilantiFross commented 3 years ago

Hi, guys. Thanks for this package!

I have some issues with this user agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OPR/73.0.3856.344/mwAV8hqc-53

I think /OPR\/([0-9\.]+)[\s]*?(\(.*\)|$)$/ RegExp almost made it, but we have asserts position at the end of a line.

Can we remove $?