<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1021815" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1021815</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-regular-expressions-0#comment-1134513</link>
    <description> &lt;p&gt;The forum software (for some unknown reason) has been forwarding me a lot of undeliverable mails as of late.  So, I know quite a few subscription emails aren&#039;t getting sent. I intend to upgrade to vB3 once it goes stable, so we&#039;ll finally be rid of all these vB2 bugs.&lt;/p&gt;
&lt;p&gt;Speaking of vB2 bugs... my code was fine (check the phps file linked above), but vB2 has a problem with escaped characters in code or php tags.  For some reason, it doesn&#039;t escape the escape characters.  Yet another quirk I&#039;ve hated about vB2.&lt;/p&gt;
&lt;p&gt;Glad you&#039;ve got it working!&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jul 2003 08:06:08 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1134513 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-regular-expressions-0#comment-1134511</link>
    <description> &lt;p&gt;@ Mark Hensler &lt;/p&gt;
&lt;p&gt; Thank you so much, that worked just fine.  Except you had a typo&lt;br /&gt;
Changes made in RED&lt;br /&gt;
&lt;code&gt;$bodytext = preg_replace(&amp;#039;#\[url=(&amp;quot;|\ &amp;#039;)?(&amp;lt;a href=&amp;quot;http://&amp;quot; class=&amp;quot;bb-url&amp;quot;&amp;gt;http://&amp;lt;/a&amp;gt;|&amp;lt;a href=&amp;quot;ftp://&amp;quot; class=&amp;quot;bb-url&amp;quot;&amp;gt;ftp://&amp;lt;/a&amp;gt;|mailto:)?(.*?)(?(1)\1)\](.*?)\[/url\]#ie&amp;#039;,&lt;/code&gt;&#039; &lt;/p&gt;
&lt;p&gt;the reason for the late reply is b/c I didn&#039;t receive an email notification...i dont&#039; know why.&lt;/p&gt;
 </description>
     <pubDate>Wed, 16 Jul 2003 07:57:17 +0000</pubDate>
 <dc:creator>section31</dc:creator>
 <guid isPermaLink="false">comment 1134511 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-regular-expressions-0#comment-1134452</link>
    <description> &lt;p&gt;&lt;a href=&quot;http://www.php.net.&quot; class=&quot;bb-url&quot;&gt;php.net.&lt;/a&gt; you can search functions&lt;/p&gt;
 </description>
     <pubDate>Tue, 15 Jul 2003 00:29:23 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1134452 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-regular-expressions-0#comment-1134444</link>
    <description> &lt;p&gt;try this:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$bodytext = preg_replace(&amp;#039;#\[url\](http://|ftp://|mailto:)?(.*?)\[/url\]#ie&amp;#039;,&lt;br /&gt;		&amp;quot;&amp;#039;&amp;lt;a href=\&amp;quot;&amp;#039;.(&amp;#039;\\1&amp;#039;==&amp;#039;&amp;#039;?&amp;#039;http://&amp;#039;:&amp;#039;\\1&amp;#039;).&amp;#039;\\2\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;&amp;#039;.(&amp;#039;\\1&amp;#039;==&amp;#039;&amp;#039;?&amp;#039;http://&amp;#039;:&amp;#039;\\1&amp;#039;).&amp;#039;\\2&amp;lt;/a&amp;gt;&amp;#039;&amp;quot;,&lt;br /&gt;		$bodytext);&lt;br /&gt;$bodytext = preg_replace(&amp;#039;#\[url=(&amp;quot;|\&amp;#039;)?(http://|ftp://|mailto:)?(.*?)(?(1)\1)\](.*?)\[/url\]#ie&amp;#039;,&lt;br /&gt;		&amp;quot;&amp;#039;&amp;lt;a href=\&amp;quot;&amp;#039;.(&amp;#039;\\2&amp;#039;==&amp;#039;&amp;#039;?&amp;#039;http://&amp;#039;:&amp;#039;\\2&amp;#039;).&amp;#039;\\3\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;gt;\\4&amp;lt;/a&amp;gt;&amp;#039;&amp;quot;,&lt;br /&gt;		$bodytext);&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
test: &lt;a href=&quot;http://host.maxalbert.com/testing_center/regex_exercise7.php&quot; class=&quot;bb-url&quot;&gt;http://host.maxalbert.com/testing_center/regex_exercise7.php&lt;/a&gt;&lt;br /&gt;
code: &lt;a href=&quot;http://host.maxalbert.com/testing_center/phps_files/regex_exercise7.phps&quot; class=&quot;bb-url&quot;&gt;http://host.maxalbert.com/testing_center/phps_files/regex_exercise7.phps&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 14 Jul 2003 17:23:27 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1134444 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-regular-expressions-0#comment-1134437</link>
    <description> &lt;p&gt;WTF, the code above didn&#039;t come out the way i wanted...hehehe  I can even edit my posts on these boards &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/sad.png&quot; title=&quot;Sad&quot; alt=&quot;Sad&quot; class=&quot;smiley-content&quot; /&gt;  ahhhhh...rofl, how do I post the url tag w/o it actually using it.  I&#039;m going to use a star for the mean time...lol  &lt;/p&gt;
&lt;p&gt;OK the code below acts like bbcode and does this [*url]link[*/url]&lt;/p&gt;
&lt;p&gt;Could someone rewrite this where it would accept both the above and something like this ---&amp;gt;&amp;gt; [*url=myurl]nameoflink[*/url] &lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$bodytext &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;preg_replace&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;`\[url\](?:=http://)?(.*?)\[/url\]`\&quot;, &#039;&amp;lt;a href=\&quot;http://\1\&quot;&amp;gt;[url]http://\1[/url]&amp;lt;/a&amp;gt;&#039;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bodytext&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 14 Jul 2003 11:20:45 +0000</pubDate>
 <dc:creator>section31</dc:creator>
 <guid isPermaLink="false">comment 1134437 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
