到目前为止我有这个:(1\d|[7-9])\d\d+x.*
问题是,它仍在吸引具有高屏幕分辨率的高端智能手机。
任何人都可以想到任何可以过滤掉智能手机的补充吗?也许用这个正则表达式过滤掉另一个维度?
谢谢!
*这个问题的解决方案会很好,但任何线索将不胜感激!
这里是一些示例数据:
Mobile Device Info Screen Resolution
Apple iPad 768x1024
Apple iPhone 320x480
Apple iPhone 320x568
Apple iPod 320x480
(not set) 320x480
(not set) 720x1280
Motorola MOTXT912B Droid Razr 4G 540x960
Samsung GT-I9300 Galaxy S3 720x1280
(not set) 320x568
Samsung SGH-T999 Galaxy S3 720x1280
Samsung SGH-I747 Galaxy S3 720x1280
(not set) 1080x1920
Samsung SPH-L710 Galaxy S3 720x1280
Apple iPod 320x568
(not set) 1440x900
(not set) 540x960
DoCoMo SC-06D Galaxy SIII LTE 720x1280
在这些情况下,Galaxy S3 正在匹配,但我找不到在不取消匹配所有其他平板电脑的情况下取消匹配的方法。
最佳答案
当我研究高级分割时,我可以选择“平板电脑流量”(而不是“包括平板电脑的移动设备”)作为过滤器(如果我理解正确的话,这将使您的正则表达式变得不必要)。
关于regex - 如何创建正则表达式来将平板电脑流量与移动流量分开?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15297425/