• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
parsing string data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

parsing string data


  • Subject: parsing string data
  • From: "C Sandeep" <email@hidden>
  • Date: Thu, 20 Dec 2007 11:30:35 -0500

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: parsing string data
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Passing arguments through a binding
  • Next by Date: Re: parsing string data
  • Previous by thread: Re: Keeping a Window on Top
  • Next by thread: Re: parsing string data
  • Index(es):
    • Date
    • Thread