Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

parsing string data



Hi all,
 I have a NSString representing a block of text, in the following format:

-----
MESSAGETYPE
header1:value
header2:value

TEXT
----

 where there are variable number of headers and no guarantee of occuring in
the same order. I want to parse this data into an NSDictionary object, with
headers as key and the values as value(!) and also the
"TEXT" in the dictionary. I have experience in perl/python, where I
would have setup regular expressions to catch the headers.

However Im at
loss on how to do the same in objective-c & cocoa. Any help is
appreciated. Thanks.

- Sandeep
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.