Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Parsing

Status
Not open for further replies.

timmbo

Programmer
Feb 22, 2001
167
US
Hi All,

I have a text string that contains the following information: "123456789%20%5BNONAME%5D,1234567890%20%5BTEST%5D"

I need to extract the numbers (123456789, 1237567890) and throw them to a vector. Can someone tell me the best way of doing this?

TIA,
Tim
 
Try the java.util.regex package. Regular expressions work great for that type of parsing, and if you google "regex" you will find all sorts of tutorial information etc. on expression syntax.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top