I'm using the regular expression from http://detectmobilebrowsers.com/ to detect if if the site is being viewed on a mobile device. Just because of it's ease of use.
Mostly it seems to be working.
I'd like to know if that's a reliable technique.
The interesting part here is that I actually imported this code into my website to redirect users to the correct version of the site depending on the device. as a result, I have earned more money.
I have also ran tests with google page-speed insights and also at webpagetest.org and even on my old phone. So far detectmobilebrowsers.com's detection scheme works nicely.