title: iPhone - evaluating JavaScript and Regular Expressions using UIWebView
body: <p>In my iPhone project, I needed to be able to validate a string either by using a Javascript function or by using a regular expression.</p>
  
  <p>This code was tested using the JavaScript and Regular Expressions from the jQuery code:
  <a href="http://docs.jquery.com/Plugins/Validation/Methods/email" rel="nofollow">http://docs.jquery.com/Plugins/Validation/Methods/email</a>
  http://docs.jquery.com/Plugins/Validation/Methods/url
  <a href="http://docs.jquery.com/Plugins/Validation/Methods/date" rel="nofollow">http://docs.jquery.com/Plugins/Validation/Methods/date</a>
  http://docs.jquery.com/Plugins/Validation/Methods/dateISO
  <a href="http://docs.jquery.com/Plugins/Validation/Methods/number" rel="nofollow">http://docs.jquery.com/Plugins/Validation/Methods/number</a>
  http://docs.jquery.com/Plugins/Validation/Methods/digits
  <a href="http://docs.jquery.com/Plugins/Validation/Methods/creditcard" rel="nofollow">http://docs.jquery.com/Plugins/Validation/Methods/creditcard</a></p>
  
  <p>I searched for a complete solution and probably missed it, so I decided to pick the pieces up and implement NSString+JavaScript+RegEx...</p>
  
  <p>I've posted it as an answer below, in case it's of value to anyone...</p>
  
  <p>Reuven</p>