<?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"
	>

<channel>
	<title>stoimen.com/blog &#187; web development</title>
	<atom:link href="http://www.stoimen.com/blog/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stoimen.com/blog</link>
	<description>web developing</description>
	<pubDate>Wed, 10 Dec 2008 05:59:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>MaYoMo - Map Your Moments</title>
		<link>http://www.stoimen.com/blog/2008/12/01/mayomo-map-your-moments/</link>
		<comments>http://www.stoimen.com/blog/2008/12/01/mayomo-map-your-moments/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 12:06:48 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[featured]]></category>

		<category><![CDATA[portfolio]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[citizen journalism]]></category>

		<category><![CDATA[map]]></category>

		<category><![CDATA[mayomo]]></category>

		<category><![CDATA[moments]]></category>

		<category><![CDATA[web media]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=122</guid>
		<description><![CDATA[please visit MaYoMo
]]></description>
			<content:encoded><![CDATA[<p>please visit <a href="http://mayomo.com">MaYoMo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/12/01/mayomo-map-your-moments/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to create a PHP Framework?</title>
		<link>http://www.stoimen.com/blog/2008/09/17/how-to-create-a-php-framework/</link>
		<comments>http://www.stoimen.com/blog/2008/09/17/how-to-create-a-php-framework/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 07:33:01 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[featured]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[learn]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[quick start]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=119</guid>
		<description><![CDATA[A very good post on how a PHP framework can be build I found here. Everyone should be familiar with the basic principles described in the article, so don&#8217;t hesitate to read it carefully.
]]></description>
			<content:encoded><![CDATA[<p>A very good post on how a PHP framework can be build I found <a href="http://nettuts.com/php/creating-a-php5-framework-part-1/">here</a>. Everyone should be familiar with the basic principles described in the article, so don&#8217;t hesitate to read it carefully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/09/17/how-to-create-a-php-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zend Framework - quick tutorial (part 2)</title>
		<link>http://www.stoimen.com/blog/2008/08/11/zend-framework-quick-tutorial-part-2-directory-layout-and-bootstrapping/</link>
		<comments>http://www.stoimen.com/blog/2008/08/11/zend-framework-quick-tutorial-part-2-directory-layout-and-bootstrapping/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 10:25:38 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[featured]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[zend framework]]></category>

		<category><![CDATA[bootstrap.php]]></category>

		<category><![CDATA[directory layout]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[front controller]]></category>

		<category><![CDATA[quick start]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[zend]]></category>

		<category><![CDATA[__autoload]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=55</guid>
		<description><![CDATA[Directory Layout and Bootstrapping.

When someone starts with the learning of a framework, first he begins to read various articles to understand the basic rules to work with.
There are a lot of tutorials how exactly to start, and there is also an official quick start guide, but beside this there are too much advices how should [...]]]></description>
			<content:encoded><![CDATA[<h2>Directory Layout and Bootstrapping.<br />
<a title="part 1 - introduction" href="http://www.stoimen.com/blog/2008/08/05/zend-framework-quick-tutorial-part-1-introduction/"></a></h2>
<p>When someone starts with the learning of a framework, first he begins to read various articles to understand the basic rules to work with.</p>
<p>There are a lot of tutorials how exactly to start, and there is also an official quick start guide, but beside this there are too much advices how should you directory layout look like.</p>
<p>For me the following directory layout is working well. I don&#8217;t remember exactly where I&#8217;ve found it, but I think many people use it.</p>
<blockquote>
<pre>
<ul>
<li>application
<ul>
<li>admin</li>
<li>controllers</li>
<li>models</li>
<li>views</li>
</ul>
</li>
<li>content
<ul>
<li>controllers</li>
<li>models</li>
<li>views</li>
</ul>
</li>
<li>layouts</li>
<li>bootstrap.php</li>
<li>config.ini</li>
<li>library</li>
<li>Zend</li>
<li>public</li>
<li>index.php</li>
</ul>
</pre>
</blockquote>
<p>Almost half of the sources &#8220;how to start&#8221; recommend all of the initialization should be in index.php in the public folder. In fact all the logic of the public/private folders is that we don&#8217;t like to show anything on the web, and that&#8217;s why index.php contains only the following peace of code (it&#8217;s recommended to leave the file open from the ?&gt; closing tag):</p>
<blockquote><p>&lt;?php<br />
require &#8216;../application/bootstrap.php&#8217;;</p>
</blockquote>
<p>Anything else, all the initialization is in bootstrap.php:</p>
<pre>error_reporting (E_ALL | E_STRICT);

ini_set ('display_startup_errors', 1);
ini_set ('display_errors', 1);

set_include_path ('../library' . PATH_SEPARATOR . get_include_path());

require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();

$front = Zend_Controller_Front::getInstance();

$front-&gt;throwExceptions(true);

$front-&gt;setControllerDirectory(array('default' =&gt; '../application/content/controllers',
'admin'   =&gt; '../application/admin/controllers'));

$front-&gt;dispatch();</pre>
<p>We set the error reporting to be ON, which si good when you develop any application and to collect all error messages. Than add the <em>library </em>folder in the include path with that line of code:</p>
<blockquote><p>set_include_path(&#8217;../library&#8217; . PATH_SEPARATOR . get_include_path());</p>
</blockquote>
<p>Next step is to start the __autoload functionality built in Zend Framework:</p>
<blockquote><p>require_once &#8220;Zend/Loader.php&#8221;;<br />
Zend_Loader::registerAutoload();</p>
</blockquote>
<p>Finally start the front controller which implements the singleton pattern and point to the two main directories - admin and content. I used them for administration panel and front end, but you can used as many as you application needs:</p>
<blockquote><p>$front-&gt;setControllerDirectory(array(&#8217;default&#8217; =&gt; &#8216;../application/content/controllers&#8217;,<br />
&#8216;admin&#8217;   =&gt; &#8216;../application/admin/controllers&#8217;));</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/08/11/zend-framework-quick-tutorial-part-2-directory-layout-and-bootstrapping/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zend Framework - quick tutorial (part 1)</title>
		<link>http://www.stoimen.com/blog/2008/08/05/zend-framework-quick-tutorial-part-1-introduction/</link>
		<comments>http://www.stoimen.com/blog/2008/08/05/zend-framework-quick-tutorial-part-1-introduction/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 20:36:45 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[web development]]></category>

		<category><![CDATA[zend framework]]></category>

		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[joomla]]></category>

		<category><![CDATA[simfony]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=45</guid>
		<description><![CDATA[Introduction
I&#8217;ve decided to write a quick tutorial about the way I work with Zend Framework. The problems I have, and the way I get through their solution. I think it will be useful for anyone common with the OOP design patterns and PHP programming, who wants to start with Zend Framework.
Introduction
In my practice as programmer [...]]]></description>
			<content:encoded><![CDATA[<p>Introduction</p>
<p>I&#8217;ve decided to write a quick tutorial about the way I work with <a href="http://framework.zend.com/">Zend Framework</a>. The problems I have, and the way I get through their solution. I think it will be useful for anyone common with the OOP design patterns and PHP programming, who wants to start with Zend Framework.</p>
<p><em>Introduction</em></p>
<p>In my practice as programmer I&#8217;ve noticed, that almost 90% of the sites we&#8217;ve build, have the same problems to solve and similar milestones.</p>
<p>At first why we need a framework? Because most of the programmers start from the beginning with the design of abstraction layers, and the time for the design is absolutely wasted when there are already that kind of abstraction given from almost every framework. Many of them have a big community of programmers around and cover a large scale of programming issues.</p>
<p>The obvious conclusion here is that there are not much sense in loosing that time. In the other part learning and using a framework with the scale of Zend Framework also requires a lot of time, but there&#8217;s no need of learning every part of it before you really start. That can happen later on.</p>
<p>That&#8217;s what happened in my case. Before two years I&#8217;ve designed and build my own framework, which does a lot of good work to organize the working process in the company I worked than. Than I start using a content management systems (CMS), mainly <a href="http://joomla.org/">Joomla!</a>, but recently noticed, that our clients don&#8217;t need that many functionality as Joomla! offers. They did not create a &#8220;menu&#8221; or add &#8220;template&#8221;.</p>
<p>With the idea to create web systems with my own CMS I decided to use Zend Framework. Not just like that, but mostely because the other PHP frameworks like <a href="http://cakephp.org/">CakePHP</a> or <a href="http://www.symfony-project.org/">Symfony</a> looked to me more like CMS, something that I don&#8217;t want, because I&#8217;d like to build my own steping on the base of framework which gives those abstraction layers like db connection, acl etc.</p>
<p>With this tutorial I&#8217;ll describe the path I passed trough using the Zend Framework, and how it can be basicaly used.</p>
<p><a title="directory layout and bootstrapping" href="http://www.stoimen.com/blog/2008/08/11/zend-framework-quick-tutorial-part-2-directory-layout-and-bootstrapping/">part 2 - directory layout and bootstrapping</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/08/05/zend-framework-quick-tutorial-part-1-introduction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to remove onPress dotted outline of html links?</title>
		<link>http://www.stoimen.com/blog/2008/08/05/how-to-remove-dotted-outline-on-link/</link>
		<comments>http://www.stoimen.com/blog/2008/08/05/how-to-remove-dotted-outline-on-link/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 14:07:13 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[web development]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[link]]></category>

		<category><![CDATA[outline]]></category>

		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=37</guid>
		<description><![CDATA[One of the questions I&#8217;ve always like to answer is how to remove a default link decoration &#8220;onPress&#8221; event. Almost every browser puts a dotted outline around the link.

At last today I get how to remove this feature described in the following article.
]]></description>
			<content:encoded><![CDATA[<p>One of the questions I&#8217;ve always like to answer is how to remove a default link decoration &#8220;onPress&#8221; event. Almost every browser puts a dotted outline around the link.</p>
<p><a href="http://css-tricks.com/wp-content/csstricks-uploads/dottedoutlineexample.png"><img class="alignnone" title="Html link with outline enabled" src="http://css-tricks.com/wp-content/csstricks-uploads/dottedoutlineexample.png" alt="" width="570" height="137" /></a></p>
<p>At last today I get how to remove this feature described in the following <a href="http://css-tricks.com/removing-the-dotted-outline/">article</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/08/05/how-to-remove-dotted-outline-on-link/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Why should we learn a framework?</title>
		<link>http://www.stoimen.com/blog/2008/08/04/why-you-should-learn-a-framework/</link>
		<comments>http://www.stoimen.com/blog/2008/08/04/why-you-should-learn-a-framework/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 08:21:17 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[featured]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[learn]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=27</guid>
		<description><![CDATA[If anybody still asks should we learn a framework, I recommend him to read the recent post
of Ian P. Christian.
Before you start, however there are no recommendation there about which framework you&#8217;ve to choose, but he gives a good examples and advices why there&#8217;s no need to apply common design patters over and over again.
]]></description>
			<content:encoded><![CDATA[<p>If anybody still asks should we learn a framework, I recommend him to read the recent <a href="http://pookey.co.uk/blog/archives/56-Should-you-learn-a-framework.html">post</a><br />
of Ian P. Christian.</p>
<p>Before you start, however there are no recommendation there about which framework you&#8217;ve to choose, but he gives a good examples and advices why there&#8217;s no need to apply common design patters over and over again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/08/04/why-you-should-learn-a-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zend_Layout</title>
		<link>http://www.stoimen.com/blog/2008/07/31/zend-layout-dont-include-header-every-time/</link>
		<comments>http://www.stoimen.com/blog/2008/07/31/zend-layout-dont-include-header-every-time/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 12:50:38 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[featured]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[zend_layout]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=22</guid>
		<description><![CDATA[Или как да не пишем във всеки шаблон, че ще има header.
Всеки, който започва да използва нов web framework първоначално се запитва за няколко основни неща. Като цяло те и отговарят на MVC практиката.

Как да направим така че всичките ни състояния в сайта да бъдат описани в различни файлове, така че да можем лесно да [...]]]></description>
			<content:encoded><![CDATA[<h2>Или как да не пишем във всеки шаблон, че ще има header.</h2>
<p>Всеки, който започва да използва нов web framework първоначално се запитва за няколко основни неща. Като цяло те и отговарят на <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a> практиката.</p>
<ol>
<li>Как да направим така че всичките ни състояния в сайта да бъдат описани в различни файлове, така че да можем лесно да си намираме и поддържаме кода.</li>
<li>Как да се погрижим за правата и ролите на различните потребители на сайта.</li>
<li>Как да разделим html-а на няколко файла, за да не пишем по един милион пъти includes на header или footer.</li>
</ol>
<p>Почти всеки, който се е сблъсквал с PHP програмиране е чувал за <a href="http://www.smarty.net/">Smarty</a> и когато някой, по-често псевдо разбирач, ти изреди една плеяда колко е ретроградно да се слага php код измежду html таговете и как трябвало Smarty да се притече на помощ, ето един добър довод за излагане против Smarty.</p>
<p>Хубаво е да се ползва Smarty. Няма проблем. Само че нека си представим следния пример. Имаме сайт с header - content - footer. Като обикновено header-a съдържа разни връзки към css и meta тагове. Със Smarty като искаме да използваме тая структура за 10 файла, 10 пъти ще имаме следния код:</p>
<blockquote><p>{include file=&#8221;header.tpl&#8221;}</p>
<p>{include file=&#8221;content.tpl&#8221;}</p>
<p>{include file=&#8221;footer.tpl&#8221;}</p></blockquote>
<p>и ако това се повтаря в 100 файла, ще се наложи, няма как - 100 пъти едно и също за тоя header и footer.</p>
<p>След като и <a href="http://framework.zend.com/">Zend Framework</a> се е измъчил в по-предишни версии, доколкото разбирам, все пак аз отскоро се захванах с него и направо започнах от 1.5.3, сега проблемът се решава от <a href="http://framework.zend.com/manual/en/zend.layout.html">Zend_Layout</a>. A и сблъсквайки се с проблема с header-a и footer-a стигнаь до четене на няколко урока, от които разбрах, че хората преди са се опитвали да решат проблема с plugin към <a href="http://framework.zend.com/manual/en/zend.controller.front.html">Front Controller-а</a> и явно това е било разпространената практика.</p>
<p>Може би и на създателите на ZF им е станало ясно, че така няма да стане и затова се е погрижил Zend_Layout.</p>
<p>Дори сега се появяват уроци които се стремят да помогнат на решаването на този проблем с помощта на plugin, но аз препоръчвам да не се захваща никой с тях, въпреки че може на някой да му е интересно. Най-добре да се насочи към използването на Zend_Layout. За жалост пък при него поне официалната документация ми се видя недостатъчно, но пък намерих една <a href="http://static.zend.com/topics/ZendLayoutZendView.pdf">презентация</a> от <a href="http://devzone.zend.com/article/3311-Zend_Layout-and-Zend-_View-Enhancements-Webinar">webinar</a> на Zend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/07/31/zend-layout-dont-include-header-every-time/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zend_Controller_Front plugins</title>
		<link>http://www.stoimen.com/blog/2008/07/31/zend_controller_front-plugins/</link>
		<comments>http://www.stoimen.com/blog/2008/07/31/zend_controller_front-plugins/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 08:27:42 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[web development]]></category>

		<category><![CDATA[zend framework]]></category>

		<category><![CDATA[front_controller]]></category>

		<category><![CDATA[plugins]]></category>

		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=16</guid>
		<description><![CDATA[Една от особеностите на Zend Framework Front Controller е фактът, че може лесно да се напишат и ползват plugins към него. Колкото до официалната документация на ZF, поне според мен, не е достатъчно описателна и не дава ясна представа какво точно правят тези plugins и колкото и добре да е показано как се пишат и [...]]]></description>
			<content:encoded><![CDATA[<p>Една от особеностите на Zend Framework Front Controller е фактът, че може лесно да се напишат и ползват plugins към него. Колкото до официалната документация на ZF, поне според мен, не е достатъчно описателна и не дава ясна представа какво точно правят тези plugins и колкото и добре да е показано как се пишат и как са замислени не става известно какво предимство дават на приложението.</p>
<p>Добра статия за това как да се напише plugin и какви предимства дава може да се намери в една <a href="http://devzone.zend.com/article/3372-Front-Controller-Plugins-in-Zend-Framework">статия</a>, която намерих днес.</p>
<p>Ето и някои от предимствата на плъгините:</p>
<ol>
<li>Инициализация на приложението</li>
<li>Кеширане</li>
<li>Инициализация на router-а</li>
<li>Authentication и Authorization</li>
<li>Филтриране на изходния XHTML</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/07/31/zend_controller_front-plugins/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to start with Zend Framework</title>
		<link>http://www.stoimen.com/blog/2008/07/31/how-to-start-with-zend-framework/</link>
		<comments>http://www.stoimen.com/blog/2008/07/31/how-to-start-with-zend-framework/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 08:03:15 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[web development]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[starting]]></category>

		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=11</guid>
		<description><![CDATA[Because there are too many articles about how to start with Zend Framework, today I saw one, which was interesting to me. And there is a cool .pdf describing the sample beggining of a Zend Framework project. If someone needs to see it - there it is free for use.
Well at least it describes how [...]]]></description>
			<content:encoded><![CDATA[<p>Because there are too many articles about how to start with Zend Framework, today I saw <a href="http://ruben.savanne.be/articles/integrating-zend-framework-and-doctrine">one</a>, which was interesting to me. And there is a cool .pdf describing the sample beggining of a <a href="http://framework.zend.com">Zend Framework</a> project. If someone needs to see it - there it is free for use.</p>
<p>Well at least it describes how to integrate Doctrine with ZF.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2008/07/31/how-to-start-with-zend-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Perl Regular Expressions</title>
		<link>http://www.stoimen.com/blog/2007/10/17/perl-regular-expressions/</link>
		<comments>http://www.stoimen.com/blog/2007/10/17/perl-regular-expressions/#comments</comments>
		<pubDate>Wed, 17 Oct 2007 11:45:53 +0000</pubDate>
		<dc:creator>stoimen</dc:creator>
		
		<category><![CDATA[featured]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.stoimen.com/blog/archives/4</guid>
		<description><![CDATA[perl regular expressions]]></description>
			<content:encoded><![CDATA[<p>For everyone who did write a code someday comes the question of using regular expressions. Almost everybody has heart about automatic and regular languages. Assume you have all word for a given languages, which means all possible combination between the letters of a given alphabet. For all these possible word only few construct the &#8220;language&#8221; as we know this term. Of course there&#8217;s also need of grammatic, etc. But however we have the set of words in a given language.</p>
<p>Than comes the task to find those of the words of the language that match a given condition. In fact the regular expressions are a powerful tool to do this job.</p>
<p>Using PHP you can use preg_ functions, which will perform a perl regular expressions match.  In my case I had to find in about 180 .html files specific words.</p>
<p>Assume the files contain something like:</p>
<pre>&lt;!-- wellformed html comment --&gt;</pre>
<pre>&lt;tr&gt;</pre>
<pre>&lt;td class="classname1"&gt;&lt;img ...&gt;&lt;/td&gt;

&lt;td class="classname2"&gt;

&lt;a ... &gt;

Word to match

&lt;/a&gt;

&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td ...&gt;&lt;/td&gt;

&lt;td ...&gt;&lt;/td&gt;

&lt;/tr&gt;

&lt;!--wellformed html comment--&gt;</pre>
<p>The regular expressions for <strong>preg_replace</strong> function I used was something like this:</p>
<pre>'/^[t|s]*&lt;tr&gt;.*?$n^.*?&lt;td.*?&lt;/td&gt;.*?$n.*?</pre>
<pre>&lt;td.*?$n.*?&lt;a.*?&gt;.*?$n.*?Word  to  match.*?$n.*?&lt;/a&gt;.*$n.*?&lt;/td&gt;.*$n.*?</pre>
<pre>&lt;/tr&gt;.*$n.*?&lt;tr.*$n.*?&lt;td.*$n.*?&lt;td.*$n.*?&lt;/tr&gt;/m'</pre>
<p>&#8230; and it worked for me. In fact if you use &#8217;s&#8217; instead of &#8216;m&#8217; modifier that&#8217;s gonna be you mistake cause of the multiple matches before the current tag you want to match.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.stoimen.com/blog/2007/10/17/perl-regular-expressions/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
