O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide by Joe Conway, Aaron Hillegass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

NSRegularExpression

Currently, the table of RSSItems shows each item’s title, and this title is an NSString that consists of the name of the subforum, the title of the post, and the name of the author:

G​e​n​e​r​a​l​ ​B​o​o​k​ ​D​i​s​c​u​s​s​i​o​n​s​ ​:​:​ ​B​N​R​ ​B​o​o​k​s​ ​:​:​ ​R​e​p​l​y​ ​b​y​ ​E​v​e​r​y​o​n​e​

It would be easier to browse posts if the table showed just the titles of the posts. To accomplish this, we need to parse the full item title, grab the string between the set of double colons, and set the title of each RSSItem to be just this string.

In RSSChannel.h, declare a new method that will eventually do these things.

@​i​n​t​e​r​f​a​c​e​ ​R​S​S​C​h​a​n​n​e​l​ ​:​ ​N​S​O​b​j​e​c​t​ ​<​N​S​X​M​L​P​a​r​s​e​r​D​e​l​e​g​a​t​e​>​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required