<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vim, Cygwin, MySQL &#38; Zsh Tips by zzapper &#187; regex</title>
	<atom:link href="http://zzapper.co.uk/tag/regex/feed/" rel="self" type="application/rss+xml" />
	<link>http://zzapper.co.uk</link>
	<description></description>
	<lastBuildDate>Wed, 18 Jan 2012 23:15:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Perl: Regexp to filter out/match just the price/floating point number ie digits and dots</title>
		<link>http://zzapper.co.uk/perl-regexp-to-filter-outmatch-just-the-pricefloating-point-number-ie-digits-and-dots/</link>
		<comments>http://zzapper.co.uk/perl-regexp-to-filter-outmatch-just-the-pricefloating-point-number-ie-digits-and-dots/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 11:05:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[price]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regexp]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/perl-regexp-to-filter-outmatch-just-the-pricefloating-pint-number-ie-digits-and-dots/</guid>
		<description><![CDATA[There are two ways:- $price=~tr/0-9.//cd; # delete anything but 0-9 and a real dot $row_array[6]=~s/[^0-9.]//g; # clean up price, remove pound/dollar sign etc]]></description>
			<content:encoded><![CDATA[<p>There are two ways:-</p>
<p>$price=~tr/0-9.//cd; # delete anything but 0-9 and a real dot</p>
<p>$row_array[6]=~s/[^0-9.]//g; # clean up price, remove pound/dollar sign etc</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/perl-regexp-to-filter-outmatch-just-the-pricefloating-point-number-ie-digits-and-dots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing HTML with preg_match</title>
		<link>http://zzapper.co.uk/parsing-html-with-preg_match/</link>
		<comments>http://zzapper.co.uk/parsing-html-with-preg_match/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 20:46:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=97</guid>
		<description><![CDATA[preg_match_all(&#8216;#&#60;b>.+?&#60;/b>#i&#8217;, $html, $matches); // ? means non-greedy and is absolutely critical $match[1], $match[2] contain the results Non greedy stops the match gobbling everything between the first bold tag and the very last. I&#8217;ve never quite understood why greedy is the default behavior of RegExp (Regular Expressions) but I guess there&#8217;s a good reason for it. [...]]]></description>
			<content:encoded><![CDATA[<p>preg_match_all(&#8216;#&lt;b>.+?&lt;/b>#i&#8217;, $html, $matches);<br />
// ? means non-greedy and is absolutely critical</p>
<p>$match[1], $match[2] contain the results</p>
<p>Non greedy stops the match gobbling everything between the first bold tag and the very last. I&#8217;ve never quite understood why greedy is the default behavior of RegExp (Regular Expressions) but I guess there&#8217;s a good reason for it.</p>
<p>PHP also has the very useful <a href="http://www.php.net/manual/en/function.strip-tags.php">strip_tags</a> function.</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/parsing-html-with-preg_match/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

