I have a little question ,I have a NSString object
(\n “1 Infinite Loop”,\n “Cupertino, CA 95014”,\n USA\n)
and i want the substring present within 2nd double quote and first comma of 2nd double quote (Ex.Cupertino) from this string.(Note: My string is Dynamic)
Till now I have used stringByReplacingOccurrencesOfString: and able to get “1InfiniteLoop””CupertinoCA95014″USA
But still not able get Cupertino.
Is any other method able to solve this problem?
Use a substringWithRange: :
After the explanation in your comment, I’d say