wood burning stoves 2.0
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getting version number from user-agent" Watch "getting version number from user-agent" New topic

getting version number from user-agent

Jim Haley

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

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

I agree. Here's the link: http://aspose.com/file-tools
subject: getting version number from user-agent
jQuery in Action, 3rd edition