<?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 in Ruby</title>
	<atom:link href="http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/</link>
	<description></description>
	<lastBuildDate>Tue, 24 Aug 2010 18:20:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Simons Blog</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-11007</link>
		<dc:creator>Simons Blog</dc:creator>
		<pubDate>Tue, 24 Nov 2009 17:54:11 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-11007</guid>
		<description>&lt;strong&gt;bwin-Mails parsen, diesmal mit Ruby...&lt;/strong&gt;

Wie man bwin-Mails mit PHP parsed hatte ich ja schonmal beschrieben, jedoch habe ich das ganze nun nochmal in Ruby und mit IMAP statt POP3 wiederholt. Nun kann ich jede ungelesene Mail (ohne den Flag &quot;Seen&quot;) abrufen und muss mir keine Sorgen ...</description>
		<content:encoded><![CDATA[<p><strong>bwin-Mails parsen, diesmal mit Ruby&#8230;</strong></p>
<p>Wie man bwin-Mails mit PHP parsed hatte ich ja schonmal beschrieben, jedoch habe ich das ganze nun nochmal in Ruby und mit IMAP statt POP3 wiederholt. Nun kann ich jede ungelesene Mail (ohne den Flag &quot;Seen&quot;) abrufen und muss mir keine Sorgen &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramzi Ferchichi</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-797</link>
		<dc:creator>Ramzi Ferchichi</dc:creator>
		<pubDate>Wed, 11 Jun 2008 09:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-797</guid>
		<description>On the subject of &quot;preg_match_all vs. String#scan&quot;, to achieve the same nesting of values in the $matches array of preg_match_all, add the PREG_SET_ORDER flag.

preg_match_all(&#039;/([a-z0-9_.-]+)@([a-z0-9-]+)\.[a-z.]+/i&#039;, $string, $matches, PREG_SET_ORDER); 

var_export($matches);
//  =&gt; array(
//      array(&#039;joe@example.com&#039;, &#039;joe&#039;, &#039;example&#039;),
//      array(&#039;walter@example.org&#039;, &#039;walter&#039;, &#039;example&#039;)
//  )</description>
		<content:encoded><![CDATA[<p>On the subject of &#8220;preg_match_all vs. String#scan&#8221;, to achieve the same nesting of values in the $matches array of preg_match_all, add the PREG_SET_ORDER flag.</p>
<p>preg_match_all(&#8216;/([a-z0-9_.-]+)@([a-z0-9-]+)\.[a-z.]+/i&#8217;, $string, $matches, PREG_SET_ORDER); </p>
<p>var_export($matches);<br />
//  =&gt; array(<br />
//      array(&#8216;joe@example.com&#8217;, &#8216;joe&#8217;, &#8216;example&#8217;),<br />
//      array(&#8216;walter@example.org&#8217;, &#8216;walter&#8217;, &#8216;example&#8217;)<br />
//  )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-189</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Mon, 31 Mar 2008 23:16:05 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-189</guid>
		<description>It is worth adding that you will need to escape a different set of characters on ruby than in php.  For instance the curly braces &#039;{&#039;, &#039;}&#039;, and &#039;#&#039; need to be escaped in ruby because they have special meaning in strings.</description>
		<content:encoded><![CDATA[<p>It is worth adding that you will need to escape a different set of characters on ruby than in php.  For instance the curly braces &#8216;{&#8216;, &#8216;}&#8217;, and &#8216;#&#8217; need to be escaped in ruby because they have special meaning in strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: junaid</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-152</link>
		<dc:creator>junaid</dc:creator>
		<pubDate>Wed, 19 Mar 2008 06:15:58 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-152</guid>
		<description>We can achieve preg_replace_callback functionality in ruby this way
   def my_test_method(matches)
        return &quot;_pk&quot;
   end
   my_string = &#039;joe@example@example.com; walter@example.org&#039;
   str = my_string.gsub(/@([a-z0-9-]+)/){ &#124;match&#124; my_test_method(match) }
    puts str

Thanks for nice article. Its really very helpful to me.
Regards
Junaid malik.</description>
		<content:encoded><![CDATA[<p>We can achieve preg_replace_callback functionality in ruby this way<br />
   def my_test_method(matches)<br />
        return &#8220;_pk&#8221;<br />
   end<br />
   my_string = &#8216;joe@example@example.com; <a href="mailto:walter@example.org">walter@example.org</a>&#8216;<br />
   str = my_string.gsub(/@([a-z0-9-]+)/){ |match| my_test_method(match) }<br />
    puts str</p>
<p>Thanks for nice article. Its really very helpful to me.<br />
Regards<br />
Junaid malik.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: junaid</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-151</link>
		<dc:creator>junaid</dc:creator>
		<pubDate>Wed, 19 Mar 2008 05:00:01 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-151</guid>
		<description>Nice article. What is the alternative of preg_replace_callback in ruby?</description>
		<content:encoded><![CDATA[<p>Nice article. What is the alternative of preg_replace_callback in ruby?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-42</link>
		<dc:creator>Derek</dc:creator>
		<pubDate>Wed, 23 Jan 2008 23:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-42</guid>
		<description>Markus: Thanks, and fixed</description>
		<content:encoded><![CDATA[<p>Markus: Thanks, and fixed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-37</link>
		<dc:creator>Markus</dc:creator>
		<pubDate>Wed, 23 Jan 2008 09:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-37</guid>
		<description>You said &quot;by enclosing the pattern in backslashes&quot;, but I think you meant the forward slash in this case?</description>
		<content:encoded><![CDATA[<p>You said &#8220;by enclosing the pattern in backslashes&#8221;, but I think you meant the forward slash in this case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Php Developer</title>
		<link>http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/comment-page-1/#comment-24</link>
		<dc:creator>Php Developer</dc:creator>
		<pubDate>Fri, 18 Jan 2008 08:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://railsforphp.com/2008/01/17/regular-expressions-in-ruby/#comment-24</guid>
		<description>Excellent rails regexp tutorial. YOu can find more about regexp here 

http://www.regular-expressions.info/</description>
		<content:encoded><![CDATA[<p>Excellent rails regexp tutorial. YOu can find more about regexp here </p>
<p><a href="http://www.regular-expressions.info/" rel="nofollow">http://www.regular-expressions.info/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
