title: Using NSRegularExpression to create custom NSDataDetector Type
body: <p>I'm trying to create custom data detectors for content in a UITextView.  I'd like to be able to do something like this:</p>
  
  <pre><code>tv.dataDetectorTypes = UIDataDetectorTypeAll;
  </code></pre>
  
  <p>but instead of UIDataDetectorTypeAll, I want to use my custom UIDataDetector based on the following regular expression:</p>
  
  <pre><code>    NSError *error = nil;        
      NSRegularExpression *regex = [[NSRegularExpression alloc] initWithPattern:@"(ID: [0-9]+)"
                                                                        options:NSRegularExpressionCaseInsensitive
                                                                          error:&amp;error];
  </code></pre>
  
  <p>I also would like the detected ID to be a link which pushes a UIWebView with a URL + ID combo (<a href="http://www.stack.com?id" rel="nofollow">http://www.stack.com?id</a>) to the nav stack.  There should only ever be one id.  Any ideas?</p>
  
  <p>Thanks!</p>