The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Parsing

Posted by Sean on July 28, 2000 at 4:32 AM

Parsing a message into its component parts
Any ideas would be appreciated !

The format of the message is variable
~ = field separator
# list separator (lists can contain fields OR Records of fields)
& record separator

field1~field2~field3
#(start of list1) element1OfList1~element2OfList1~element3OfList1
#(start of list2)&(start of record )rec1Field1~rec1Field2
rec2Field1~rec2Field2
rec3Field1~rec3Field2

list of fields or records always appear at the end of the incoming string. I hope this makes sense ??

Should I be using recursion ??
I'm sure that Java contains some useful classes that I'm

THANKS Sean

PS do we have an equivalent in java of the 'C' sprintf



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us