>
<h2 id="bsd-grep">BSD grep</h2>
<pre>
<samp>$ <kbd>printf "foo\nbar\n" | grep ""</kbd>
foo
bar</samp>
</pre>
<h2 id="perl">Perl</h2>
<pre>
<samp>$ <kbd>perl -e 'print(("foo" =~ //) . "\n")'</kbd>
1</samp>
</pre>
<h2 id="python">Python</h2>
<pre>
<samp>$ <kbd>python</kbd>
Python 2.5.2 (r252:60911, Jan  4 2009, 21:59:32)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; <kbd>import re; re.compile('').search('foo')</kbd>
&lt;_sre.SRE_Match object at 0x7