<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 08 Jul 2008 23:41:46 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Tokenization using regular expression sub patterns]]></title>
      <guid>http://www.phpdeveloper.org/news/9449</guid>
      <link>http://www.phpdeveloper.org/news/9449</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog there's a <a href="http://www.sitepoint.com/blogs/2008/01/19/tokenization-using-regular-expression-sub-patterns/">new post</a> from <i>Harry Fuecks</i> talking about a replacement method using token that works a bit better than the typical regular expression method.
</p>
<blockquote>
Promtped by a real world example, one often-overlooked feature of most regular expressions engines is how subpatterns can useful to whip up tokenizers relatively easily. The problem? I needed to match the word any of the words "Canton", "Region" or "Group" in a string and perform a follow up action depending on which matched.
</blockquote>
<p>
His ultimate solution used a set of preg_match generated tokens to do the replaces a bit more reliably. It also makes it easy for other scripts (like his Python example) to use them too.
</p>]]></description>
      <pubDate>Fri, 18 Jan 2008 11:15:49 -0600</pubDate>
    </item>
  </channel>
</rss>
