*
The moose likes Servlets and the fly likes getting version number from user-agent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getting version number from user-agent" Watch "getting version number from user-agent" New topic
Author

getting version number from user-agent

Jim Haley
Greenhorn

Joined: Feb 23, 2009
Posts: 2
I'm looking for a way to check the version number in the user-agent. I would like to get the version numbers so I can test if the version is greater than 5.1. Once 5.1.1 or 5.2 roll out I don't want to adjust my code. I was looking into using regular expression but was having some problems. Thoughts?

Here two examples of 2 user-agent strings
hemantha kumar k
Greenhorn

Joined: Apr 20, 2010
Posts: 27

This is not about regex or any thing else, just it is a logic you have to think about it, you can get your output in many ways here it is one way you can achieve it

 
 
subject: getting version number from user-agent
 
Similar Threads
API to get Browser from UserAgent string
Browsers Support Ajax
Detect OS
Splitting a string - Different behavior between win xp and linux
HttpUrlConnection is not working