![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Need help on reqexp of a string Topic Summary: Created On: 21-Apr-2005 19:21 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have an input string that contain words in characters and numerics, I need to extract all numeric words and put them into a new string. Here is an exmple of a string:
string sTemp = "12345 something_here, 23456, text_again, 09876 56789" Can anyone please help to extract the numerics from the above string. So, it should return as "12345 23456 09876 56789". I did look at the Regexp but couldn't get it work. Thanks in advance! |
|
![]() |
|
![]() |
|
Try the code below. It is commented, so you should be able to adapt it for what you need.
------------------------- Bruce Tuskey Sr. Principle Engineer Tuskey@gmail.com "All that is gold does not glitter, not all those who wander are lost:..." - Gandalf the Grey (JRR Tolkien) Edited: 21-Apr-2005 at 20:40 by Bruce Tuskey |
|
![]() |
|
![]() |
|
Or a bit simpler:
|
|
![]() |
|
![]() |
|
Thanks Bruce and Paul, both answers work great!
Thanks again for all your help!!! |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Need help on reqexp of a string
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.