I want to ignore the iPad as a mobile device in my application
I am currently using this expression to detect mobile devices:
request.user_agent =~ /Mobile|webOS/
Standard material. The iPad Agent line looks something like this:
Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B405 Safari/531.21.10
I tried the following without success:
request.user_agent =~ /!(iPad)(Mobile|webOS)/
Please let me know what is wrong with the expression.
Thank.
source
share