File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Spring in Action this week in the Spring 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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting version number from user-agent