| 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
|
 |
 |
|
|
subject: string stuff
|
|
|