aspose file tools
The moose likes Beginning Java and the fly likes string stuff Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "string stuff" Watch "string stuff" New topic
Author

string stuff

Ruchee Goyal
Greenhorn

Joined: Sep 12, 2006
Posts: 12
Hi,
I've a string which is being populated at runtime from database with OS (operating system) values say AIX 5.2, Linux 2.4 etc.

Now i need to take the version thing(5.2, 2.4 etc) out and just return the version free OS string to the user.

what can be the best way to do that?
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2341
What about a regular expression where you ignore digits and a dot?
Ruchee Goyal
Greenhorn

Joined: Sep 12, 2006
Posts: 12
Thanks for the hint.

i've not used it ever - i'll try and let you know if i find any problem
Srikanth Ramu
Ranch Hand

Joined: Feb 20, 2007
Posts: 76
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Originally posted by Ruchee Goyal:
Hi,
I've a string which is being populated at runtime from database with OS (operating system) values say AIX 5.2, Linux 2.4 etc.

Now i need to take the version thing(5.2, 2.4 etc) out and just return the version free OS string to the user.

what can be the best way to do that?


If the value that you get from database is space seperated , the you might want to use split.



Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: string stuff
 
Similar Threads
Admin Server Hangs on high load - WebSphere 4.0.4
download websphere
API to get Browser from UserAgent string
Jboss 5.2 Clustering using two system
Applet showDocument() not working in IE5.2 under MAC OS X (10.2.4)