RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 4
Title Test Details useragents of bots
Expression
/(bot|spider|crawler|google)/
Description
run this against a useragent of your browser and you will get all bots
Matches
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
Non-Matches
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Author Rating: Not yet rated. A Bösefrau
Title Test Details find tablets by useragents
Expression
$sPatternTablet = '/(Tablet|iPad|iPod)/';
Description
run this against a useragent of your browser and you will get all tablets
Matches
Mozilla/5.0 (iPad; CPU OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B511 Safari/9537.53
Non-Matches
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Author Rating: Not yet rated. A Bösefrau
Title Test Details mobile devices by useragent
Expression
/(Windows Phone|iPhone|BlackBerry|Mobile|Android|Opera Mini|Opera Mobile|SymbianOS)/
Description
find mobile devices by running this regex against the useragent of the browser
Matches
Mozilla/5.0 (Linux; U; Android 2.1-update1; ms-my; SonyEricssonE15i Build/2.1.1.A.0.6) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
Non-Matches
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Author Rating: Not yet rated. A Bösefrau
Title Test Details playstation and tv sets by useragent
Expression
/(XBOX|Nintendo Wii|smarttv|playstation|hbbtv|philipstv|opera tv|inettv)/
Description
run this against the browsers user agent and you get all playstations and tv sets
Matches
Opera/9.80 (Linux armv7l; InettvBrowser/2.2 (00014A;SonyDTV115;0002;0100) KDL42W674A; CC/THA) Presto/2.12.362 Version/12.11
Non-Matches
Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8600/1.0; U; Bada/2.0; ms-my) AppleWebKit/534.20 (KHTML, like Gecko) Dolfin/3.0 Mobile WVGA SMM-MMS/1.2.0 OPN-B
Author Rating: Not yet rated. A Bösefrau
   Displaying page 1 of 1 pages; Items 1 to 4

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials