<?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>Regular expression &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/regular-expression/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Flexible JavaScript &#8211; Replace in a String</title>
		<link>/2010/08/25/flexible-javascript-replace-in-a-string/</link>
		<comments>/2010/08/25/flexible-javascript-replace-in-a-string/#respond</comments>
		<pubDate>Wed, 25 Aug 2010 12:36:02 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Curly bracket programming languages]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JavaScript syntax]]></category>
		<category><![CDATA[Parameter]]></category>
		<category><![CDATA[Pattern matching]]></category>
		<category><![CDATA[Perl 6 rules]]></category>
		<category><![CDATA[Regular expression]]></category>
		<category><![CDATA[Scripting languages]]></category>
		<category><![CDATA[Software engineering]]></category>

		<guid isPermaLink="false">/?p=1923</guid>
		<description><![CDATA[Here&#8217;s yet another example of the JavaScript flexibility. You can simply call .replace() on every string and pass a regex as a parameter! var str = 'my simple string'; str.replace(/ /g, '-'); // now 'str' will contain 'my-simple-string'<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/08/24/flexible-javascript-splitting-strings/" rel="bookmark" title="Flexible JavaScript &#8211; Splitting Strings">Flexible JavaScript &#8211; Splitting Strings </a></li>
<li><a href="/2010/08/26/javascript-flexibility-regex-match/" rel="bookmark" title="JavaScript Flexibility &#8211; Regex match()">JavaScript Flexibility &#8211; Regex match() </a></li>
<li><a href="/2011/07/12/a-javascript-trick-you-should-know/" rel="bookmark" title="A JavaScript Trick You Should Know">A JavaScript Trick You Should Know </a></li>
<li><a href="/2011/08/18/powerful-php-less-known-string-manipulation/" rel="bookmark" title="Powerful PHP: Less Known String Manipulation">Powerful PHP: Less Known String Manipulation </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s yet another example of the JavaScript flexibility. You can simply call .replace() on every string and pass a regex as a parameter!</p>
<pre lang="javascript">
var str = 'my simple string';
str.replace(/ /g, '-'); // now 'str' will contain 'my-simple-string'
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/08/24/flexible-javascript-splitting-strings/" rel="bookmark" title="Flexible JavaScript &#8211; Splitting Strings">Flexible JavaScript &#8211; Splitting Strings </a></li>
<li><a href="/2010/08/26/javascript-flexibility-regex-match/" rel="bookmark" title="JavaScript Flexibility &#8211; Regex match()">JavaScript Flexibility &#8211; Regex match() </a></li>
<li><a href="/2011/07/12/a-javascript-trick-you-should-know/" rel="bookmark" title="A JavaScript Trick You Should Know">A JavaScript Trick You Should Know </a></li>
<li><a href="/2011/08/18/powerful-php-less-known-string-manipulation/" rel="bookmark" title="Powerful PHP: Less Known String Manipulation">Powerful PHP: Less Known String Manipulation </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/08/25/flexible-javascript-replace-in-a-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Controller_Router_Route_Regex &#8211; the Power of Regular Expressions</title>
		<link>/2010/04/23/zend_controller_router_route_regex-the-power-of-regular-expressions/</link>
		<comments>/2010/04/23/zend_controller_router_route_regex-the-power-of-regular-expressions/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 12:35:12 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[Pattern matching]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[Regular expression]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">/?p=1470</guid>
		<description><![CDATA[I posted once of custom URLs within Zend Framework, but back than I wasn&#8217;t quite sure enough there isn&#8217;t a better, more elegant way to do this job. Of course as it appears, there is! With no need to is to use the power of regular expressions with Zend_Controller_Router_Route_Regex. Thus you can match dynamically the &#8230; <a href="/2010/04/23/zend_controller_router_route_regex-the-power-of-regular-expressions/" class="more-link">Continue reading <span class="screen-reader-text">Zend_Controller_Router_Route_Regex &#8211; the Power of Regular Expressions</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/04/26/mysql-expressions-in-zend-framework/" rel="bookmark" title="MySQL Expressions in Zend Framework">MySQL Expressions in Zend Framework </a></li>
<li><a href="/2010/04/20/custom-routes-with-zend_controller_router_route/" rel="bookmark" title="Custom Routes with Zend_Controller_Router_Route">Custom Routes with Zend_Controller_Router_Route </a></li>
<li><a href="/2010/07/21/setting-up-global-cache-in-zend-framework/" rel="bookmark" title="Setting Up Global Cache in Zend Framework">Setting Up Global Cache in Zend Framework </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I posted once of custom URLs within Zend Framework, but back than I wasn&#8217;t quite sure enough there isn&#8217;t a better, more elegant way to do this job. Of course as it appears, there is! With no need to is to use the power of regular expressions with Zend_Controller_Router_Route_Regex. Thus you can match dynamically the URL.</p>
<p>Let&#8217;s assume you&#8217;d like to have a link with something like <strong>www.example.com/3939-some-title-here</strong>. This is really very common. So to proceed you&#8217;d have to have some regex like:</p>
<pre lang="php">
$pattern = '/\d+-.*/;
</pre>
<h2>So what about Zend Framework</h2>
<p>Here the things are going naturally more OOP.</p>
<pre lang="php">
$route = new Zend_Controller_Router_Route_Regex('(\d+)-?(.*)',
                       array('controller' => 'controller_name', 'action' => 'action_name'),
                       array(1 => 'id'));

$ctrl->addRoute('my-route', $route);
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/04/26/mysql-expressions-in-zend-framework/" rel="bookmark" title="MySQL Expressions in Zend Framework">MySQL Expressions in Zend Framework </a></li>
<li><a href="/2010/04/20/custom-routes-with-zend_controller_router_route/" rel="bookmark" title="Custom Routes with Zend_Controller_Router_Route">Custom Routes with Zend_Controller_Router_Route </a></li>
<li><a href="/2010/07/21/setting-up-global-cache-in-zend-framework/" rel="bookmark" title="Setting Up Global Cache in Zend Framework">Setting Up Global Cache in Zend Framework </a></li>
<li><a href="/2010/04/22/iterate-over-youtube-channel-with-zend_gdata_youtube/" rel="bookmark" title="Iterate over YouTube Channel with Zend_Gdata_YouTube">Iterate over YouTube Channel with Zend_Gdata_YouTube </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/04/23/zend_controller_router_route_regex-the-power-of-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
