IPv4 Regular Expression

by Vitaly, Monday, February 15th, 2016

Accurate regular expression to match IPv4 address:

((([0-9])|(1[0-9][0-9]?)|([2-9][0-9])|(2[0-4][0-9])|(25[0-5]))\.){3}(([0-9])|(1[0-9][0-9]?)|([2-9][0-9])|(2[0-4][0-9])|(25[0-5]))

Tags: ,


User Agents

by Vitaly, Monday, April 27th, 2015

“User-Agent” HTTP header allows to identify Internet Explorer version.

Look the following article to learn more about Internet Explorer user-agent strings: Understanding user-agent strings.

Pay attention to the compatibility changes in IE 11:

  • The compatible (“compatible”) and browser (“MSIE”) tokens have been removed.
  • The “like Gecko” token has been added (for consistency with other browsers).
  • The version of the browser is now reported by a new revision (“rv”) token.

Below is the list of some user-agent strings used by Internet Explorer 8-11:

IE 8:

  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; msn OptimizedIE8;NLNL)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; BTRS101581; .NET CLR 1.1.4322; .NET CLR 2.0.50727; msn OptimizedIE8;NLNL)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; .NET4.0E; msn OptimizedIE8;ENCA)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB7.5; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; msn OptimizedIE8;ENGB)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; .NET CLR 2.0.50727; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; msn OptimizedIE8;ENZA)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0E; .NET4.0C; msn OptimizedIE8;ZHTW)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; BRI/2; .NET CLR 2.0.50727; AskTbORJ/5.15.25.36191; msn OptimizedIE8;ENGB)
  • Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTbX-SD/5.14.1.20007; msn OptimizedIE8;ENUS)

IE 9:

  • Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
  • Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Tablet PC 2.0; MS-RTC LM 8; InfoPath.3; msn OptimizedIE8;ENGB)
  • Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E; msn OptimizedIE8;NLNL)
  • Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0C; .NET CLR 3.0.30729; .NET4.0E; msn OptimizedIE8;NLNL)

IE 10:

  • Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)
  • Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; BRI/2; MAPB; EIE10;NLNLMSN)
  • Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; EIE10;NLNLMSN)

IE 11:

  • Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko
  • Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko
  • Mozilla/5.0 (Windows NT 6.3; Win64, x64; Trident/7.0; Touch; rv:11.0) like Gecko
  • Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko
  • Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; NP08; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729; EIE10;NLNLMSN; rv:11.0) like Gecko

Tags: , ,