Bug Tracker

Opened 14 years ago

Closed 14 years ago

#5127 closed bug (duplicate)

$.broswer.version

Reported by: shenkong Owned by:
Priority: critical Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc: [email protected]
Blocked by: Blocking:

Description

var str = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 2.0.50727; CIBA; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)'.toLowerCase();

add ? after / .+

alert((/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/.exec(str)
[0,'0'])[1]);

or

alert((str.match( /.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/ )
[0,'0'])[1])

Change History (1)

comment:1 Changed 14 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #2661.

Note: See TracTickets for help on using tickets.