Objective-C: How to extract part of a String (e.g. start with '#')

Viewed 70772

I have a string as shown below,

NSString * aString = @"This is the #substring1 and #subString2 I want";

How can I select only the text starting with '#' (and ends with a space), in this case 'subString1' and 'subString2'?

Note: Question was edited for clarity

7 Answers
Related