title: NSScanner Remove Substring Quotation from NSString
body: <p>I have <code>NSString's</code> in the form of <code>Johnny likes "eating" apples</code>. I want to remove the quotations from my strings so that.</p>
  
  <blockquote>
    <p>Johnny likes "eating" apples</p>
  </blockquote>
  
  <p>becomes</p>
  
  <blockquote>
    <p>John likes apples</p>
  </blockquote>
  
  <p>I've been playing with NSScanner to do the trick but I'm getting some crashes.</p>
  
  <pre><code>- (NSString*)clean:(NSString*) _string
  {   
     NSString *string = nil;
     NSScanner *scanner = [NSScanner scannerWithString:_string];
     while ([scanner isAtEnd] == NO)  
     {
        [scanner scanUpToString:@"\"" intoString:&amp;string];
        [scanner scanUpToString:@"\"" intoString:nil];
        [scanner scanUpToString:@"." intoString:&amp;string]; // picked . becuase it's not in the string, really just want rest of string scanned
     }
     return string;
  }
  </code></pre>