我如何创建RegEx来将平板电脑流量与移动流量区分开来



到目前为止,我有这个:(1\d|[7-9](\d+x.*

问题是,它仍在吸引具有高屏幕分辨率的高端智能手机
有人能想出什么能过滤掉智能手机的附加功能吗?也许用这个RegEx过滤掉另一个维度?

谢谢!

*这个问题的解决方案很好,但任何线索都将不胜感激!

以下是一些示例数据:

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正在匹配,但我找不到一种方法在不匹配所有其他平板电脑的情况下取消匹配。

当我查看高级细分市场时,我可以选择"平板电脑流量"(而不是"包括平板电脑在内的移动设备"(作为过滤器(如果我理解正确,这将使您的正则表达式不必要(。

最新更新