<?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>follow the white rabbit &#187; WordPress</title>
	<atom:link href="http://blog.ftwr.co.uk/categorias/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ftwr.co.uk</link>
	<description>Random commentary...</description>
	<lastBuildDate>Mon, 20 May 2013 12:51:34 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-beta3-24300</generator>
		<item>
		<title>Fixing your unit tests</title>
		<link>http://blog.ftwr.co.uk/archives/2012/12/19/fixing-your-unit-tests/</link>
		<comments>http://blog.ftwr.co.uk/archives/2012/12/19/fixing-your-unit-tests/#comments</comments>
		<pubDate>Wed, 19 Dec 2012 12:26:28 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web dev]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[silly mistakes]]></category>
		<category><![CDATA[unit tests]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=787</guid>
		<description><![CDATA[You know that thing that happens when you love writing unit tests so much that you completely forget the argument order of all the assert(Equals&#124;InstanceOf) functions. Yeah it does happen, I&#8217;m sure it is not just me You write everything in as $this-&#62;assertEquals( function_call(), 'expected string' ); and then you get really confused when phpunit [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>You know that thing that happens when you love writing unit tests so much that you completely forget the argument order of all the <code>assert(Equals|InstanceOf)</code> functions.</p>
<p>Yeah it does happen, I&#8217;m sure it is not just me <img src='http://i2.wp.com/blog.ftwr.co.uk/wp-includes/images/smilies/icon_wink.gif?w=920' alt=';)' class='wp-smiley' data-recalc-dims="1" /> </p>
<p>You write everything in as <code>$this-&gt;assertEquals( function_call(), 'expected string' );</code> and then you get really confused when phpunit tells you it expects the wrong result from the function you haven&#8217;t implemented yet and received the expected result.</p>
<p>You do!</p>
<p>Good, I managed to write tests the wrong way round for two days before I realised and I wasn&#8217;t looking forward to going through and correcting them all, but then I remembered the power of <code>sed</code> and started cooking a recipe up.</p>
<p>It turned out pretty simple: <code>sed -i "s/\(.*assert[^(]*\)( \([^,]*\), \([^)]*\) );/\1( \3, \2 );/" file_of_tests.php</code>.</p>
<p>What it does:</p>
<ul>
<li>Capture the start of the line up to the call to the assert function in &#8216;\1&#8242;</li>
<li>Capture the two function arguments in &#8216;\2&#8242; and &#8216;\3&#8242;</li>
<li>Rewrite the matched line with the arguments switched</li>
</ul>
<p>That was fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2012/12/19/fixing-your-unit-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Horsham Coworking</title>
		<link>http://blog.ftwr.co.uk/archives/2012/06/07/horsham-coworking/</link>
		<comments>http://blog.ftwr.co.uk/archives/2012/06/07/horsham-coworking/#comments</comments>
		<pubDate>Thu, 07 Jun 2012 15:40:26 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[coworking]]></category>
		<category><![CDATA[horshamcoworking]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/archives/2012/06/07/horsham-coworking/</guid>
		<description><![CDATA[Had a great time today at the #horshamcoworking meetup with @LoudMouthMan and @CliveWalker. Looking forward to future events.]]></description>
				<content:encoded><![CDATA[<p>Had a great time today at the #horshamcoworking meetup with <a href="https://twitter.com/#!/loudmouthman" onclick="pageTracker._trackPageview('/outgoing/twitter.com/_/loudmouthman?referer=');">@LoudMouthMan</a> and <a href="https://twitter.com/#!/CliveWalker" onclick="pageTracker._trackPageview('/outgoing/twitter.com/_/CliveWalker?referer=');">@CliveWalker</a>. Looking forward to future events.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2012/06/07/horsham-coworking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling WordPress @ #wpldn</title>
		<link>http://blog.ftwr.co.uk/archives/2012/01/20/scaling-wordpress-wpldn/</link>
		<comments>http://blog.ftwr.co.uk/archives/2012/01/20/scaling-wordpress-wpldn/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 10:04:18 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[wpldn]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=595</guid>
		<description><![CDATA[Last night I did a short presentation on Scaling WordPress using WordPress.com as an example giving an overview of the solutions we use for different scaling issues as well as highlighting some solutions that you can try out on smaller sites:]]></description>
				<content:encoded><![CDATA[<p>Last night I did a short presentation on Scaling WordPress using WordPress.com as an example giving an overview of the solutions we use for different scaling issues as well as highlighting some solutions that you can try out on smaller sites:</p>
<div style="width: 450px; margin-left: auto; margin-right: auto; padding:10px;"><iframe src="http://www.slideshare.net/slideshow/embed_code/11172307" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="425" height="355"></iframe></div>
<div style="width: 450px; margin-left: auto; margin-right: auto;"></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2012/01/20/scaling-wordpress-wpldn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My ethos for sharing code</title>
		<link>http://blog.ftwr.co.uk/archives/2011/12/08/my-ethos-for-sharing-code/</link>
		<comments>http://blog.ftwr.co.uk/archives/2011/12/08/my-ethos-for-sharing-code/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 09:11:08 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[automattic]]></category>
		<category><![CDATA[ethos]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=581</guid>
		<description><![CDATA[A recent discussion around the way we write and share small helper scripts inside Automattic made me think a lot about why I do things the way I do and why I am against &#8220;authorship attribution&#8221; in shared code. The views I have are strong and I think a good guiding principle for working collaboratively [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>A recent discussion around the way we write and share small helper scripts inside Automattic made me think a lot about why I do things the way I do and why I am against &#8220;authorship attribution&#8221; in shared code.</p>
<p>The views I have are strong and I think a good guiding principle for working collaboratively with your peers especially in Open Source projects:</p>
<blockquote><p>I am very strongly against authorship attribution – it puts up a barrier to contribution by setting a subconscious ownership barrier around things.</p>
<p>I give you my code to do as you wish, I mold your code to do as I wish, I blame early and often when searching for bugs, and I expect you to have forgotten you wrote the tool I’m asking you about especially if you committed it yesterday!</p></blockquote>
<p>What is your ethos and what do you think of mine?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2011/12/08/my-ethos-for-sharing-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding complex RegEx</title>
		<link>http://blog.ftwr.co.uk/archives/2011/03/18/understanding-complex-regex/</link>
		<comments>http://blog.ftwr.co.uk/archives/2011/03/18/understanding-complex-regex/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 11:29:01 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=528</guid>
		<description><![CDATA[I&#8217;ve been wondering for a while if there was a good way of reverse engineering the meaning/function from a complex Regular Expression pattern such as the one used in the make_clickable function in WordPress.  This morning while debugging an issue with this function causing occasional segfaults in php I started searching around for a suitable [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been wondering for a while if there was a good way of reverse engineering the meaning/function from a complex Regular Expression pattern such as the one used in the <code>make_clickable</code> function in WordPress.  This morning while debugging an issue with this function causing occasional segfaults in php I started searching around for a suitable tool and found <a href="http://search.cpan.org/dist/YAPE-Regex-Explain/" onclick="pageTracker._trackPageview('/outgoing/search.cpan.org/dist/YAPE-Regex-Explain/?referer=');">YAPE::Regex::Explain</a> to be the only reasonable solution.</p>
<p><span id="more-528"></span>So with trepidation I started installing modules from CPAN and converting an example script to take the RegEx using in <code>make_clickable</code>. I ended up with the following simple script:</p>
<pre class="brush: perl; title: ; notranslate">
use strict;
use warnings;
use YAPE::Regex::Explain;

my $re = qr/(?&lt;!--=[\'&quot;])(?&lt;=[*\')+.,;:!&amp;#038;\$\s--&gt;])(\()?([\w]+?:\/\/(?:[\w\\x80-\\xff#%~\/?@\[\]-]|[\'*(+.,;:!=&amp;\$](?![\b\)]|(\))?([\s]|$))|(?(1)
\)(?![\s&lt;.,;:]|$)|\)))+)/; print YAPE::Regex::Explain-&gt;new($re)-&gt;explain();
</pre>
<p>Which generated the following detailed output:</p>
<blockquote><p>The regular expression:</p>
<p>(?-imsx:(?&lt;!=[\'"])(?&lt;=[*\')+.,;:!&amp;\$\s&gt;])(\()?([\w]+?://(?:[\w\\x80-\\xff#%~/?@\[\]-]|[\'*(+.,;:!=&amp;\$](?![\b\)]|(\))?([\s]|$))|(?(1)\)(?![\s&lt;.,;:]|$)|\)))+))</p>
<p>matches as follows:</p>
<p>NODE                     EXPLANATION<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?-imsx:                 group, but do not capture (case-sensitive)<br />
(with ^ and $ matching normally) (with . not<br />
matching \n) (matching whitespace and #<br />
normally):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?&lt;!                     look behind to see if there is not:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
=                        &#8216;=&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\'"]                    any character of: &#8216;\&#8221;, &#8216;&#8221;&#8216;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-behind<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?&lt;=                     look behind to see if there is:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[*\')+.,;:!&amp;\$\s&gt;]       any character of: &#8216;*&#8217;, &#8216;\&#8221;, &#8216;)&#8217;, &#8216;+&#8217;,<br />
&#8216;.&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;:&#8217;, &#8216;!&#8217;, &#8216;&amp;&#8217;, &#8216;\$&#8217;,<br />
whitespace (\n, \r, \t, \f, and &#8221; &#8220;),<br />
&#8216;&gt;&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-behind<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \1 (optional<br />
(matching the most amount possible)):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\(                       &#8216;(&#8216;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)?                       end of \1 (NOTE: because you are using a<br />
quantifier on this capture, only the LAST<br />
repetition of the captured pattern will be<br />
stored in \1)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \2:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\w]+?                   any character of: word characters (a-z,<br />
A-Z, 0-9, _) (1 or more times (matching<br />
the least amount possible))<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
://                      &#8216;://&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?:                      group, but do not capture (1 or more<br />
times (matching the most amount<br />
possible)):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\w\\x80-                any character of: word characters (a-<br />
\\xff#%~/?@\[\]-         z, A-Z, 0-9, _), &#8216;\\&#8217;, &#8216;x&#8217;, &#8217;8&#8242;, &#8217;0&#8242;<br />
]                        to &#8216;\\&#8217;, &#8216;x&#8217;, &#8216;f&#8217;, &#8216;f&#8217;, &#8216;#&#8217;, &#8216;%&#8217;, &#8216;~&#8217;,<br />
&#8216;/&#8217;, &#8216;?&#8217;, &#8216;@&#8217;, &#8216;\[', '\]&#8216;, &#8216;-&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\'*(+.,;:!=&amp;\$]         any character of: &#8216;\&#8221;, &#8216;*&#8217;, &#8216;(&#8216;, &#8216;+&#8217;,<br />
&#8216;.&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;:&#8217;, &#8216;!&#8217;, &#8216;=&#8217;, &#8216;&amp;&#8217;,<br />
&#8216;\$&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?!                      look ahead to see if there is not:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\b\)]                   any character of: &#8216;\b&#8217; (backspace),<br />
&#8216;\)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \3 (optional<br />
(matching the most amount<br />
possible)):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\)                       &#8216;)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)?                       end of \3 (NOTE: because you are<br />
using a quantifier on this capture,<br />
only the LAST repetition of the<br />
captured pattern will be stored in<br />
\3)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(                        group and capture to \4:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\s]                     any character of: whitespace (\n,<br />
\r, \t, \f, and &#8221; &#8220;)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
$                        before an optional \n, and the end<br />
of the string<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of \4<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-ahead<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?(1)                    if back-reference \1 matched, then:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\)                       &#8216;)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
(?!                      look ahead to see if there is not:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[\s&lt;.,;:]                any character of: whitespace (\n,<br />
\r, \t, \f, and &#8221; &#8220;), &#8216;&lt;&#8217;, &#8216;.&#8217;,<br />
&#8216;,&#8217;, &#8216;;&#8217;, &#8216;:&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        OR<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
$                        before an optional \n, and the end<br />
of the string<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of look-ahead<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
|                        else:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\)                       &#8216;)&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of conditional on \1<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)+                       end of grouping<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of \2<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
)                        end of grouping<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2011/03/18/understanding-complex-regex/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Always show admin bar</title>
		<link>http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/</link>
		<comments>http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 11:24:28 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin bar]]></category>
		<category><![CDATA[mu-plugin]]></category>
		<category><![CDATA[wp3.1]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=516</guid>
		<description><![CDATA[I like the admin bar that we are adding in the soon to be released WordPress 3.1 so much that I wanted it to always show on my site.  This way you get an easy to use search box on every page even when logged out. I wrote a quick plugin file which I dropped [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I like the admin bar that we are adding in the soon to be released WordPress 3.1 so much that I wanted it to always show on my site.  This way you get an easy to use search box on every page even when logged out.</p>
<p>I wrote a quick plugin file which I dropped into the <code>wp-content/mu-plugins</code> folder on this site. Here is the code I used in case you want to do the same:</p>
<pre class="brush: php; title: ; notranslate">

&lt;?php
function pjw_login_adminbar( $wp_admin_bar) {
 if ( !is_user_logged_in() )
 $wp_admin_bar-&gt;add_menu( array( 'title' =&gt; __( 'Log In' ), 'href' =&gt; wp_login_url() ) );
}
add_action( 'admin_bar_menu', 'pjw_login_adminbar' );
add_filter( 'show_admin_bar', '__return_true' , 1000 );

</pre>
<p>As you can see to make it even more useful I&#8217;ve added a Log In link so I can use it to log in to the site.</p>
<p><strong>As with anything else to do with the Admin bar this code requires WordPress 3.1 to work.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2011/01/05/always-show-admin-bar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Switching from Manual to Automattic</title>
		<link>http://blog.ftwr.co.uk/archives/2010/08/23/switching-from-manual-to-automattic/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/08/23/switching-from-manual-to-automattic/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 21:24:54 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[automattic]]></category>
		<category><![CDATA[dotcom]]></category>
		<category><![CDATA[dotorg]]></category>
		<category><![CDATA[happiness]]></category>
		<category><![CDATA[job]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=456</guid>
		<description><![CDATA[Over the past few years I have been an active member of the WordPress.org community in my spare time whilst having a day job which was completely unrelated to WordPress.  I have found it a useful learning experience, gaining knowledge from all the smart people we have in the community and have also found it [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Over the past few years I have been an active member of the WordPress.org community in my spare time whilst having a day job which was completely unrelated to WordPress.  I have found it a useful learning experience, gaining knowledge from all the smart people we have in the community and have also found it rewarding to help people realise their full potential.</p>
<p>This level of enjoyment has led me to consider at a number of points in time whether or not I should switch job and work full-time on WordPress.org as a freelance consultant or as an Automattician.  In the end it felt like the right thing for me to do was to apply to be an Automattician.  This will hopefully ensure that I have a dependable long-term income stream and the ability to spend my spare time on the things I love: Music, Photography, Food, and of course WordPress.</p>
<p>It is with great pleasure that I am therefore able to reveal that I will soon be switching and starting a full-time job working for Automattic as a &#8220;Happiness Gardener&#8221;.</p>
<p>So what does this mean, I hear you cry?  Well to me it means a number of things:</p>
<p>First of all I will be getting to work with the fantastic team at Automattic on a daily basis and helping the Happiness Engineers to improve the tools they have, and the experience bloggers have, by working to remove some of the issues which are a frequent source of support tickets.</p>
<p>Secondly this means that I will have an easier time structuring my work around contributing to the core of WordPress.org.  In the short-term my availability to work on WordPress.org may be reduced solely because there are a lot of things the Happiness Engineers would like me to do to make it easier for them to ensure that all of the bloggers on WordPress.com are as happy as they could be.  In the long-term I hope to be able to spend some of my work time working on WordPress.org and helping Automattic give back to the community even more than it already does.</p>
<p>Thirdly it means that I might be able to attend a few more WordCamps in order to listen to community feedback in person and answer questions on both WordPress.org and WordPress.com.  I am certainly not going to stop listening to the feedback from the community at large or focus my WordPress.org contributions on things which Automattic want to be done.  I think one of the most positive things about WordPress.org is that it is a meritocracy and everyone can play a part, my new job will not change my attitude or contributions.  I want the WordPress.org community to continue to grow organically as it has over the past years, and together we can all ensure that WordPress.org continues to be the simplest and most beautiful open-source online publishing platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/08/23/switching-from-manual-to-automattic/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>WordPress Sussex and Surrey meetup group</title>
		<link>http://blog.ftwr.co.uk/archives/2010/07/28/wordpress-sussex-and-surrey-meetup-group/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/07/28/wordpress-sussex-and-surrey-meetup-group/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 17:29:26 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=430</guid>
		<description><![CDATA[As I mentioned in my previous post I&#8217;m thinking of starting a meetup group for all things WordPress in the Sussex and Surrey areas. I&#8217;m not sure of the exact format yet but I&#8217;m thinking if we start with small ambitions and try organise a monthly meetup for users and developers interested in WordPress and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>As I mentioned in my <a href="http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/">previous post</a> I&#8217;m thinking of starting a meetup group for all things WordPress in the Sussex and Surrey areas.</p>
<p>I&#8217;m not sure of the exact format yet but I&#8217;m thinking if we start with small ambitions and try organise a monthly meetup for users and developers interested in WordPress and any of its sister projects.</p>
<p>I am thinking of organising something on a week night with the first meetup to happen in August and then try to arrange them to occur on a monthly basis.</p>
<p>So as I can get an idea of interested numbers and ideal locations please comment on this post if you would be interested in attending letting me know if there are any week nights you can&#8217;t do and with the area you would be travelling from so I can try to pick somewhere that is easily accessible to as many people as possible.</p>
<p>Once I&#8217;ve got a good idea of numbers and localities I will arrange the first meetup.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/07/28/wordpress-sussex-and-surrey-meetup-group/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Thoughts on #wordcampuk 2010</title>
		<link>http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 20:59:52 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordcamp]]></category>
		<category><![CDATA[wordcampuk]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=420</guid>
		<description><![CDATA[This past weekend was the 3rd WordCamp to be held in the UK and I had a great time both as a speaker and a participant.  It is great to see how the event has grown over the past 2 years from a small affair with around 50 attendees up to one with around 150. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This past weekend was the 3rd WordCamp to be held in the UK and I had a great time both as a speaker and a participant.  It is great to see how the event has grown over the past 2 years from a small affair with around 50 attendees up to one with around 150.</p>
<p>I am really impressed with the way in which a disparate group of people have pulled together with little central coordination and pulled together a great event. However I do think that we need to sit back and reflect on where we have come from where we are going and what is going to serve the community at large.  The community of WordPress users and developers has grown at an astounding rate over the past few years and so has the number of WordCamps.</p>
<p>For me this years WordCamp had some great learning points for how we can do better &#8211; these come from things that have affected me directly and also feedback I have received from others.</p>
<ul>
<li>We need to get tickets on sale earlier &#8211; people like to organise their weekends and travel in advance</li>
<li>We need to organise the schedule better &#8211; having focused tracks for different audiences with a list of topics and presenters available in advance so that people can plan their schedule and know what they are going to find out.</li>
<li>We need to think about how we lay out the rooms &#8211; It was harder to get to know the other attendees this year because we were in front facing lecture theatre style layout rather than the Banquet/Cabaret style layout we&#8217;ve used in the past</li>
<li>We need to think about naming &#8211; WordCamps are big and small and I think that the UK community has reached the tipping point where it could support more than one some years. We could do more to emphasise that by thinking about the name and maybe name the next one after the City/Town/Region that it is held in to make it really obvious that other UK based WordCamps would be great.</li>
<li>I think we should try harder to organise some more regional groups to try an emulate the success that has been achieved in Manchester &#8211; I wonder how many people would be interested in a monthly WordPress Sussex meetup?  Let me know!</li>
<li>We need to think more about the social events &#8211; It was great to get to visit FAC251 but it really wasn&#8217;t the best venue for networking and talking to other WordPress users / developers &#8211; I would have much preferred a quieter venue where I could have actually talked to people and not felt like I was melting.</li>
<li>We need to consider focussing on a single kick-ass day of major sessions and the leaving the second day for more informal networking and BarCamp style lightning talks &#8211; this is a format that quite a few other WordCamps around the world are using with great success and ensures that there is lots of time for the spontaneous connections to be made.</li>
</ul>
<p>I know that some of these suggestions may seem controversial, and I&#8217;ve read about the wrap-up session that I missed, but we should remember that anyone in the community at large has the right to organise another WordCamp and if there are people in the UK that would like to organise other &#8220;competing&#8221; events I think we should try as hard as possible to support them in any way we can &#8211; we know how difficult it was to get the first event off the ground and have built an infrastructure of contacts and resources that they should be able to leverage to make it easier.</p>
<p>If you want to get involved in organising a WordCamp and want to find out more read on <a href="http://central.wordcamp.org/about/" onclick="pageTracker._trackPageview('/outgoing/central.wordcamp.org/about/?referer=');">here</a> and if you have any questions feel free to email me!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/07/19/thoughts-on-wordcampuk-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t blame the Kitteh</title>
		<link>http://blog.ftwr.co.uk/archives/2010/04/23/dont-blame-the-kitteh/</link>
		<comments>http://blog.ftwr.co.uk/archives/2010/04/23/dont-blame-the-kitteh/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 06:44:34 +0000</pubDate>
		<dc:creator>westi</dc:creator>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[kitteh]]></category>
		<category><![CDATA[meme]]></category>

		<guid isPermaLink="false">http://blog.ftwr.co.uk/?p=396</guid>
		<description><![CDATA[During last nights WordPress dev chat we got distracted by the Kitteh.  Now we have a WordPress Kitteh meme &#8211; http://cheezburger.com/View/3444964352 My contribution:]]></description>
				<content:encoded><![CDATA[<p>During last nights <a href="http://wpdevel.wordpress.com/2010/04/22/live-blog-of-apr-22nd-2010-dev-chat/" onclick="pageTracker._trackPageview('/outgoing/wpdevel.wordpress.com/2010/04/22/live-blog-of-apr-22nd-2010-dev-chat/?referer=');">WordPress dev chat</a> we got distracted by the <a href="http://brizzly.com/pic/25SX" onclick="pageTracker._trackPageview('/outgoing/brizzly.com/pic/25SX?referer=');">Kitteh</a>.  Now we have a WordPress Kitteh meme &#8211; <a href="http://cheezburger.com/View/3444964352" onclick="pageTracker._trackPageview('/outgoing/cheezburger.com/View/3444964352?referer=');">http://cheezburger.com/View/3444964352</a></p>
<p>My contribution:</p>
<div class="wp-caption aligncenter" style="width: 510px"><a href="http://cheezburger.com/View/3446980864" onclick="pageTracker._trackPageview('/outgoing/cheezburger.com/View/3446980864?referer=');"><img title="Ok intarwebs, sawry, working on 3.0 now" src="http://i1.wp.com/images.cheezburger.com/completestore/2010/4/22/129164777472495202.jpg?resize=500%2C375" alt="Ok intarwebs, sawry, working on 3.0 now" data-recalc-dims="1" /></a><p class="wp-caption-text">Ok intarwebs, sawry, working on 3.0 now</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ftwr.co.uk/archives/2010/04/23/dont-blame-the-kitteh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>