aspose file tools*
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
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

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getting version number from user-agent