<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Sak's Weblog &#187; Programming</title>
	<atom:link href="http://sakibfarid.wordpress.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://sakibfarid.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 31 Aug 2009 19:48:06 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='sakibfarid.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/5dc02112c3d5122d0aaae9f53bf53d37?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Sak's Weblog &#187; Programming</title>
		<link>http://sakibfarid.wordpress.com</link>
	</image>
			<item>
		<title>Kohana Credit Card Pre-Authorisation Payment Driver</title>
		<link>http://sakibfarid.wordpress.com/2009/08/31/kohana-credit-card-pre-authorisation-payment-driver/</link>
		<comments>http://sakibfarid.wordpress.com/2009/08/31/kohana-credit-card-pre-authorisation-payment-driver/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 19:44:38 +0000</pubDate>
		<dc:creator>Sakib Farid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[payment driver]]></category>
		<category><![CDATA[payment module]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHP Framework]]></category>
		<category><![CDATA[pre-authorisation]]></category>

		<guid isPermaLink="false">http://sakibfarid.wordpress.com/?p=45</guid>
		<description><![CDATA[Kohana comes with a payment module with various payment drivers. Here is a payment driver for credit card pre authorisation&#8230;
config/payment.php

$config['Creditcard'] = array
(
 'driver'        =&#62; 'Creditcard',
);

and the payment driver&#8230;

&#60;?php defined('SYSPATH') OR die('No direct access allowed.');
/**
 * Creditcard Payment Driver
 *
 *
 * @author     Sakib Farid
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=45&subd=sakibfarid&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a title="Kohana PHP Framework" href="http://kohanaphp.com/" target="_blank">Kohana</a> comes with a payment module with various payment drivers. Here is a payment driver for credit card pre authorisation&#8230;</p>
<p>config/payment.php</p>
<pre class="brush: css;">
$config['Creditcard'] = array
(
 'driver'        =&gt; 'Creditcard',
);
</pre>
<p>and the payment driver&#8230;</p>
<pre class="brush: css;">
&lt;?php defined('SYSPATH') OR die('No direct access allowed.');
/**
 * Creditcard Payment Driver
 *
 *
 * @author     Sakib Farid
 */
class Payment_Creditcard_Driver implements Payment_Driver
{
 // Fields required to do a transaction
 private $required_fields = array
 (
 'card_num'         =&gt; false,
 //format mmyy
 'exp_date'         =&gt; false,
 );

 private $fields = array(
 'card_num'=&gt;'',
 //format mmyy
 'exp_date'=&gt;'',
 'cvv'=&gt;'',
 //format mmyy
 'start_date',
 'issue_num',
 );

 private $cc_expiry_month;
 private $cc_expiry_year;
 /**
 * Sets the config for the class.
 *
 * @param  array  config passed from the library
 */
 public function __construct($config)
 {
 Kohana::log('debug', 'Creditcard Payment Driver Initialized');
 }

 public function set_fields($fields)
 {
 foreach ((array) $fields as $key =&gt; $value)
 {
 $this-&gt;fields[$key] = $value;
 if (array_key_exists($key, $this-&gt;required_fields) and !empty($value)) $this-&gt;required_fields[$key] = true;
 }
 }

 public function process()
 {
 // Check for required fields
 if (in_array(false, $this-&gt;required_fields))
 {
 $fields = array();
 foreach ($this-&gt;required_fields as $key =&gt; $field)
 {
 if (!$field) $fields[] = $key;
 }
 return 'required_fields';
 }

 $this-&gt;fields['card_num'] = ereg_replace('[^0-9]', '', $this-&gt;fields['card_num']);

 if (ereg('^4[0-9]{12}([0-9]{3})?$', $this-&gt;fields['card_num'])) {
 $_SESSION['cc_type'] = 'Visa';
 } elseif (ereg('^5[1-5][0-9]{14}$', $this-&gt;fields['card_num'])) {
 $_SESSION['cc_type'] = 'Master Card';
 //} elseif (ereg('^3[47][0-9]{13}$', $this-&gt;card_num)) {
 //  $_SESSION['cc_type'] = 'American Express';
 } elseif (ereg('^3(0[0-5]|[68][0-9])[0-9]{11}$', $this-&gt;fields['card_num'])) {
 $_SESSION['cc_type'] = 'Diners Club';
 } elseif (ereg('^6011[0-9]{12}$', $this-&gt;fields['card_num'])) {
 $_SESSION['cc_type'] = 'Discover';
 } elseif (ereg('^(3[0-9]{4}|2131|1800)[0-9]{11}$', $this-&gt;fields['card_num'])) {
 $_SESSION['cc_type'] = 'JCB';
 } elseif (ereg('^5610[0-9]{12}$', $this-&gt;fields['card_num'])) {
 $_SESSION['cc_type'] = 'Australian BankCard';
 } elseif (ereg('((^(4903|4905|4911|4936|6333|6759)([0-9]{12}|[0-9]{14}|[0-9]{15}))|(^(564182|633110)([0-9]{10}|[0-9]{12}|[0-9]{13})))$', $this-&gt;fields['card_num'])) {
 $_SESSION['cc_type'] = 'Switch Debit Card';
 } else {
 //unknown card number
 return -1;
 }

 $expiry_m = substr($this-&gt;fields['exp_date'], 0, 2);

 if (is_numeric($expiry_m) &amp;&amp; ($expiry_m &gt; 0) &amp;&amp; ($expiry_m &lt; 13)) {
 $this-&gt;cc_expiry_month = $expiry_m;
 } else {
 //expiry month is invalid
 return -2;
 }

 $current_year = date('Y');
 $expiry_y = substr($this-&gt;fields['exp_date'], 2);
 $expiry_y = substr($current_year, 0, 2) . $expiry_y;
 if (is_numeric($expiry_y) &amp;&amp; ($expiry_y &gt;= $current_year) &amp;&amp; ($expiry_y &lt;= ($current_year + 10))) {
 $this-&gt;cc_expiry_year = $expiry_y;
 } else {
 //invalid expiry year
 return -3;
 }

 if ($expiry_y == $current_year) {
 if ($expiry_m &lt; date('n')) {
 //invalid expiry date, not in future
 return -4;
 }
 }

 $cardNumber = strrev($this-&gt;fields['card_num']);
 $numSum = 0;

 for ($i=0; $i&lt;strlen($cardNumber); $i++) {
 $currentNum = substr($cardNumber, $i, 1);

 // Double every second digit
 if ($i % 2 == 1) {
 $currentNum *= 2;
 }

 // Add digits of 2-digit numbers together
 if ($currentNum &gt; 9) {
 $firstNum = $currentNum % 10;
 $secondNum = ($currentNum - $firstNum) / 10;
 $currentNum = $firstNum + $secondNum;
 }

 $numSum += $currentNum;
 }

 // If the total has no remainder it's OK
 if ($numSum % 10 == 0) {
 return true;
 } else {
 //hasnt passed pre-authorisation
 return -5;
 }
 }

}
</pre>
<p>You must ofcourse create any forms you require.</p>
<p>Visit the <a title="Kohana PHP Framework" href="http://kohanaphp.com/" target="_blank">Kohana</a> website for more information on the <a title="Kohana Payment Module" href="http://docs.kohanaphp.com/addons/payment" target="_blank">payment module</a>.</p>
Posted in Programming Tagged: credit card, Kohana, payment driver, payment module, php, PHP Framework, pre-authorisation <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sakibfarid.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sakibfarid.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sakibfarid.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sakibfarid.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sakibfarid.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sakibfarid.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sakibfarid.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sakibfarid.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sakibfarid.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sakibfarid.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=45&subd=sakibfarid&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sakibfarid.wordpress.com/2009/08/31/kohana-credit-card-pre-authorisation-payment-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0117bb6d38dfaad0b79e05056022f742?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zak</media:title>
		</media:content>
	</item>
		<item>
		<title>400 Bad Request After SSL Install on Ubuntu 6.06 Dapper Drake Using Mod SSL / Open SSL</title>
		<link>http://sakibfarid.wordpress.com/2008/06/28/400-bad-request-after-ssl-install-on-ubuntu-606-dapper-drake-using-mod-ssl-open-ssl/</link>
		<comments>http://sakibfarid.wordpress.com/2008/06/28/400-bad-request-after-ssl-install-on-ubuntu-606-dapper-drake-using-mod-ssl-open-ssl/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 15:18:30 +0000</pubDate>
		<dc:creator>Sakib Farid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[400 Bad request]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[dapper drake]]></category>
		<category><![CDATA[Fasthosts]]></category>
		<category><![CDATA[Mod SSL]]></category>
		<category><![CDATA[Open SSL]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://sakibfarid.wordpress.com/?p=17</guid>
		<description><![CDATA[If you have a 400 bad request when installing SSL on Ubuntu Dapper Drake (virtual host configuration) then maybe the following may help you.
Check your virtual host apache file located at
/etc/apache2/sites-enabled/your-virtualhost-file
If it has the following syntax it may not work as you intended&#8230;
&#60;VirtualHost your.site.ip.address:80 your.site.ip.address:443&#62;
any other configuration in here
SSLCertificateFile path-to-your-cert-file.cert
SSLCertificateKeyFile path-to-your-cert-keyfile.key
&#60;/VirtualHost&#62;
The above syntax may give [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=17&subd=sakibfarid&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you have a 400 bad request when installing SSL on Ubuntu Dapper Drake (virtual host configuration) then maybe the following may help you.</p>
<p>Check your virtual host apache file located at<br />
/etc/apache2/sites-enabled/<em>your-virtualhost-file</em></p>
<p>If it has the following syntax it may not work as you intended&#8230;</p>
<pre class="brush: css;">&lt;VirtualHost your.site.ip.address:80 your.site.ip.address:443&gt;
any other configuration in here
SSLCertificateFile path-to-your-cert-file.cert
SSLCertificateKeyFile path-to-your-cert-keyfile.key
&lt;/VirtualHost&gt;</pre>
<p>The above syntax may give you a 400 bad request and only lets you access your website via the SSL port 443 and not the normal http port 80. You will porbably see the following error when accessing your website.</p>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You&#8217;re speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.</p>
<p>Obviously you want requests to both ports to work. Try the following syntax to correct this problem.</p>
<pre class="brush: css;">&lt;VirtualHost your.site.ip.address:80&gt;
any other configuration in here
&lt;/VirtualHost&gt;

&lt;VirtualHost your.site.ip.address:443&gt;
any other configuration in here
SSLCertificateFile path-to-your-cert-file.cert
SSLCertificateKeyFile path-to-your-cert-keyfile.key
&lt;/VirtualHost&gt;</pre>
<p>Hopefully, with abit of luck, this should correct your problem.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sakibfarid.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sakibfarid.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sakibfarid.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sakibfarid.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sakibfarid.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sakibfarid.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sakibfarid.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sakibfarid.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sakibfarid.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sakibfarid.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sakibfarid.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sakibfarid.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=17&subd=sakibfarid&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sakibfarid.wordpress.com/2008/06/28/400-bad-request-after-ssl-install-on-ubuntu-606-dapper-drake-using-mod-ssl-open-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0117bb6d38dfaad0b79e05056022f742?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zak</media:title>
		</media:content>
	</item>
		<item>
		<title>Apache ReWrite Module Setup on Ubuntu 6.06 Dapper Drake</title>
		<link>http://sakibfarid.wordpress.com/2008/06/27/apache-rewrite-module-setup-on-ubuntu-606-dapper-drake/</link>
		<comments>http://sakibfarid.wordpress.com/2008/06/27/apache-rewrite-module-setup-on-ubuntu-606-dapper-drake/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 18:47:44 +0000</pubDate>
		<dc:creator>Sakib Farid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[6.06]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[dapper drake]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://sakibfarid.wordpress.com/?p=15</guid>
		<description><![CDATA[To setup the Apache ReWrite Module on Ubuntu 6.06 Dapper Drake (virtual host setup) all you need to do is create a symbolic link for the rewrite.load in /etc/apache2/mods-enabled/
sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
Restart Apache webserver
sudo /etc/init.d/apache2 restart
Now in your .htaccess do

RewriteEngine On
RewriteRule.....
Thats all. It should work.
If its still not working for you then open /etc/apache2/sites-enabled/your-virtualhost-conf-file
and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=15&subd=sakibfarid&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To setup the Apache ReWrite Module on Ubuntu 6.06 Dapper Drake (virtual host setup) all you need to do is create a symbolic link for the rewrite.load in /etc/apache2/mods-enabled/</p>
<pre class="brush: css;">sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/</pre>
<p>Restart Apache webserver</p>
<pre class="brush: css;">sudo /etc/init.d/apache2 restart</pre>
<p>Now in your .htaccess do<br />
<code><br />
RewriteEngine On<br />
RewriteRule.....</code></p>
<p>Thats all. It should work.<br />
If its still not working for you then open /etc/apache2/sites-enabled/<em>your-virtualhost-conf-file</em><br />
and add in between your <code>&lt;Directory&gt;</code> tag</p>
<p><code>AllowOverride All</code></p>
<p>Restart Apache and thats it, your all done.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sakibfarid.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sakibfarid.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sakibfarid.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sakibfarid.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sakibfarid.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sakibfarid.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sakibfarid.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sakibfarid.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sakibfarid.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sakibfarid.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sakibfarid.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sakibfarid.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=15&subd=sakibfarid&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sakibfarid.wordpress.com/2008/06/27/apache-rewrite-module-setup-on-ubuntu-606-dapper-drake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0117bb6d38dfaad0b79e05056022f742?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zak</media:title>
		</media:content>
	</item>
		<item>
		<title>Lookahead and Lookbehind Zero Width Assertions</title>
		<link>http://sakibfarid.wordpress.com/2008/06/03/lookahead-and-lookbehind-zero-width-assertions/</link>
		<comments>http://sakibfarid.wordpress.com/2008/06/03/lookahead-and-lookbehind-zero-width-assertions/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 11:20:52 +0000</pubDate>
		<dc:creator>Sakib Farid</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[assertions]]></category>
		<category><![CDATA[expressions]]></category>
		<category><![CDATA[lookahead]]></category>
		<category><![CDATA[lookbehind]]></category>
		<category><![CDATA[negative]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[positive]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[regular]]></category>

		<guid isPermaLink="false">http://sakibfarid.wordpress.com/?p=11</guid>
		<description><![CDATA[LOOKAHEAD
When using regular expressions, sometimes you may want to match a string NOT followed by some particular word (negative lookahead) or followed by some particular  word (positive lookahead) . The construct to do this is
search string (?!some word)
search string (?=some word)
The first example will match `search string` not followed by `some word`, this is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=11&subd=sakibfarid&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>LOOKAHEAD</strong></p>
<p>When using regular expressions, sometimes you may want to match a string NOT followed by some particular word (negative lookahead) or followed by some particular  word (positive lookahead) . The construct to do this is</p>
<p><code>search string (?!some word)<br />
search string (?=some word)</code></p>
<p>The first example will match `search string` not followed by `some word`, this is a negative lookahead. The second example will match `search string` followed by `some word` which is a poitive lookahead. When using lookaheads we can use any regular expression within the brackets and even capture the match e.g.</p>
<p><code>search string (?=(regex))</code></p>
<p>In the above example we can match `search string` followed by any regular expression and also capture the regular expression.</p>
<p><strong>LOOKBEHIND</strong></p>
<p>Lookbehind on the other hand works in a slightly different way. You cannot just apply any regular expression for a lookbehind assertion, it has to be fixed width. The construct for lookbehind is</p>
<p><code>(?&lt;!some word )search string<br />
(?&lt;=some word )search string</code></p>
<p>The first example is a negative lookbehind which allows you to match `search string` not preceded by `some word `. The second will match `search string` which is preceded by `some word `.</p>
<p>Lookbehinds do not allow you to have just any regular expressions inside the lookbehind. You can only use a regular expression where the length of the match is predetermined, is a fixed width. This applies to perl, python and php. Java on the other hand may allow some extra options such as the ?</p>
<p>All in all the lookarounds in regular expressions are a powerful and indespinsible tool when matching strings.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sakibfarid.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sakibfarid.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sakibfarid.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sakibfarid.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sakibfarid.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sakibfarid.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sakibfarid.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sakibfarid.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sakibfarid.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sakibfarid.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sakibfarid.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sakibfarid.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sakibfarid.wordpress.com&blog=3872852&post=11&subd=sakibfarid&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sakibfarid.wordpress.com/2008/06/03/lookahead-and-lookbehind-zero-width-assertions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0117bb6d38dfaad0b79e05056022f742?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Zak</media:title>
		</media:content>
	</item>
	</channel>
</rss>