• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

string stuff

 
Ruchee Goyal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about a regular expression where you ignore digits and a dot?
 
Ruchee Goyal
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic