<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Regular Expressions and Cocoa</title>
	<atom:link href="http://blog.jayway.com/2009/05/06/regular-expressions-and-cocoa/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com/2009/05/06/regular-expressions-and-cocoa/</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Sun, 12 Feb 2012 05:23:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: cool8jay的Mac开发心得 &#187; iSpeLL开发日志-2010.05.09</title>
		<link>http://blog.jayway.com/2009/05/06/regular-expressions-and-cocoa/comment-page-1/#comment-38252</link>
		<dc:creator>cool8jay的Mac开发心得 &#187; iSpeLL开发日志-2010.05.09</dc:creator>
		<pubDate>Sun, 09 May 2010 15:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://79.125.9.149/?p=1617#comment-38252</guid>
		<description>[...] 解析HTML内容，最终还是选择用正则表达式，借助第三方工具RegexKitLite。参考一，参考二。 [...]</description>
		<content:encoded><![CDATA[<p>[...] 解析HTML内容，最终还是选择用正则表达式，借助第三方工具RegexKitLite。参考一，参考二。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesper Särnesjö</title>
		<link>http://blog.jayway.com/2009/05/06/regular-expressions-and-cocoa/comment-page-1/#comment-4705</link>
		<dc:creator>Jesper Särnesjö</dc:creator>
		<pubDate>Wed, 06 May 2009 21:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://79.125.9.149/?p=1617#comment-4705</guid>
		<description>Hooray, you posted your Cocoaheads presentation! Now we all have something to link to. :)

As a sidenote, this is what using regexes with NSPredicate looks like:

    NSPredicate *predicate = [NSPredicate predicateWithFormat:@&quot;SELF MATCHES &#039;^M?M?M?(CM&#124;CD&#124;D?C?C?C?)(XC&#124;XL&#124;L?X?X?X?)(IX&#124;IV&#124;V?I?I?I?)$&#039;&quot;];
    BOOL matches = [predicate evaluateWithObject:string];

Nothing new and certainly nothing as useful as a general purpose regex engine like RegexKit, but I found out that NSPredicate could do regexes just the other day, so I think it&#039;s kinda cool. ;)

(Bonus points it you can tell what the regex matches.)

Further reading:

* http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSPredicate_Class/Reference/NSPredicate.html
* http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/Articles/pUsing.html#//apple_ref/doc/uid/TP40001794-SW9</description>
		<content:encoded><![CDATA[<p>Hooray, you posted your Cocoaheads presentation! Now we all have something to link to. <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As a sidenote, this is what using regexes with NSPredicate looks like:</p>
<p>    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES '^M?M?M?(CM|CD|D?C?C?C?)(XC|XL|L?X?X?X?)(IX|IV|V?I?I?I?)$'"];<br />
    BOOL matches = [predicate evaluateWithObject:string];</p>
<p>Nothing new and certainly nothing as useful as a general purpose regex engine like RegexKit, but I found out that NSPredicate could do regexes just the other day, so I think it&#8217;s kinda cool. <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>(Bonus points it you can tell what the regex matches.)</p>
<p>Further reading:</p>
<p>* <a href="http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSPredicate_Class/Reference/NSPredicate.html" rel="nofollow">http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSPredicate_Class/Reference/NSPredicate.html</a><br />
* <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/Articles/pUsing.html#//apple_ref/doc/uid/TP40001794-SW9" rel="nofollow">http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/Articles/pUsing.html#//apple_ref/doc/uid/TP40001794-SW9</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

