Is it possible to change text within a specific part of an NSString? For example, I want to use stringByReplacingOccurrencesOfString, but only within a certain part of a string. In this example, I only want to replace #'s after #q=, and before &lang=en-us. Like this:
Initial string: https://google.com/search#q=hello#&lang=en-us
What it should be replaced with: https://google.com/search#q=hello%23&lang=en-us
What using stringByReplacingOccurrencesOfString returns if I tell it to replace #'s with %23: https://google.com/search%23q=hello%23&lang=en-us
Thanks for your help!