<?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>Kubiczek devblog &#187; regexp</title>
	<atom:link href="http://blog.kubiczek.eu/tag/regexp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kubiczek.eu</link>
	<description>I&#039;m lovin&#039; it ;)</description>
	<lastBuildDate>Thu, 19 Jan 2012 12:09:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Regexp: Wyszukiwanie i linkowanie adresów email</title>
		<link>http://blog.kubiczek.eu/2010/03/regexp-wyszukiwanie-i-linkowanie-adresow-email/</link>
		<comments>http://blog.kubiczek.eu/2010/03/regexp-wyszukiwanie-i-linkowanie-adresow-email/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 10:08:04 +0000</pubDate>
		<dc:creator>Adam Kubiczek</dc:creator>
				<category><![CDATA[Porady i solucje]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regexp]]></category>

		<guid isPermaLink="false">http://blog.kubiczek.eu/?p=316</guid>
		<description><![CDATA[Jak w prosty sposób wyszukać w tekście i automatycznie podlinkować wszystkie adres email? Można to zrobić np. w ten sposób: $string = 'Wyszukaj wszystkie qifl@ufydsg &#34;prawdziwie&#34; adresy mail@zumba.pl email imejl.kobza@lolo.bolo.com i stwórz z nich HTMLowe linki.'; &#160; $reg = '/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/i'; &#160; print preg_replace&#40;$reg, '&#60;a href=&#34;mailto:${0}&#34;&#62;${0}&#60;/a&#62;', $string&#41;;]]></description>
			<content:encoded><![CDATA[<p>Jak w prosty sposób wyszukać w tekście i automatycznie podlinkować wszystkie adres email? Można to zrobić np. w ten sposób:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Wyszukaj wszystkie qifl@ufydsg &quot;prawdziwie&quot; adresy mail@zumba.pl email imejl.kobza@lolo.bolo.com i stwórz z nich HTMLowe linki.'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$reg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/i'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">print</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$reg</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a href=&quot;mailto:${0}&quot;&gt;${0}&lt;/a&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.kubiczek.eu/2010/03/regexp-wyszukiwanie-i-linkowanie-adresow-email/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

