<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: RegExp in Flash 8 using ExternalInterface</title>
	<atom:link href="http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/</link>
	<description>You've got your good thing, and I've got mine</description>
	<pubDate>Thu, 28 Aug 2008 09:14:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: zoe</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-21931</link>
		<dc:creator>zoe</dc:creator>
		<pubDate>Sun, 18 May 2008 01:13:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-21931</guid>
		<description>Thanks just spent hours looking for this!</description>
		<content:encoded><![CDATA[<p>Thanks just spent hours looking for this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: teknoloji ve tasarım</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-21147</link>
		<dc:creator>teknoloji ve tasarım</dc:creator>
		<pubDate>Sat, 22 Mar 2008 20:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-21147</guid>
		<description>thank you useful..</description>
		<content:encoded><![CDATA[<p>thank you useful..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Woodstock Georgia Real Estate</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-20592</link>
		<dc:creator>Woodstock Georgia Real Estate</dc:creator>
		<pubDate>Tue, 05 Feb 2008 03:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-20592</guid>
		<description>Thanks for the help you provided although you did not even know about it. I found this through Google and it really saved me a ton of time.</description>
		<content:encoded><![CDATA[<p>Thanks for the help you provided although you did not even know about it. I found this through Google and it really saved me a ton of time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Burt</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-20253</link>
		<dc:creator>James Burt</dc:creator>
		<pubDate>Wed, 23 Jan 2008 09:01:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-20253</guid>
		<description>Thanks for the tutorial, they are easy to understand for a newbie like me.</description>
		<content:encoded><![CDATA[<p>Thanks for the tutorial, they are easy to understand for a newbie like me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hair care online</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-19915</link>
		<dc:creator>hair care online</dc:creator>
		<pubDate>Mon, 07 Jan 2008 09:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-19915</guid>
		<description>Good solid technical stuff (wish I understood it all)</description>
		<content:encoded><![CDATA[<p>Good solid technical stuff (wish I understood it all)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: forumbilgi</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-17513</link>
		<dc:creator>forumbilgi</dc:creator>
		<pubDate>Thu, 04 Oct 2007 18:43:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-17513</guid>
		<description>tesekkurler kanka buyuksun:)</description>
		<content:encoded><![CDATA[<p>tesekkurler kanka buyuksun:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZHANG YI</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-15110</link>
		<dc:creator>ZHANG YI</dc:creator>
		<pubDate>Fri, 12 Jan 2007 21:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-15110</guid>
		<description>Hello
Please tell me how can use action script  to validate an eamil address?

Thank you
Yi</description>
		<content:encoded><![CDATA[<p>Hello<br />
Please tell me how can use action script  to validate an eamil address?</p>
<p>Thank you<br />
Yi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14839</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 19 Oct 2006 15:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14839</guid>
		<description>Your script is very neat, jsut it cannot handle UTF-8 encoded strings :(</description>
		<content:encoded><![CDATA[<p>Your script is very neat, jsut it cannot handle UTF-8 encoded strings :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ain Tohvri</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14769</link>
		<dc:creator>Ain Tohvri</dc:creator>
		<pubDate>Wed, 20 Sep 2006 00:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14769</guid>
		<description>Hey adam, 

Apparently your regex would not validate 4-letter domains eg me@mydaomain.info

To enable support for those domains you should probably change your regex to 
&lt;code&gt;/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,4})+$/&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hey adam, </p>
<p>Apparently your regex would not validate 4-letter domains eg <a href="mailto:me@mydaomain.info">me@mydaomain.info</a></p>
<p>To enable support for those domains you should probably change your regex to<br />
<code>/^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,4})+$/</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: adam</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14690</link>
		<dc:creator>adam</dc:creator>
		<pubDate>Wed, 23 Aug 2006 16:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14690</guid>
		<description>The following is what I currently use in projects for validating email.  I use AS2/F8 and ExternalInterface, and it works wonderfully.  Remember that ExternalInterface is synchronous, so that you can do the following.
&lt;code&gt;
var isValid = Boolean(flash.external.ExternalInterface.call("validate", emailTextInput.text));
&lt;/code&gt;

Place this javascript in your "&#60;head&gt;" tag.
&lt;code&gt;
&#60;script type="text/javascript"&gt;
    function validate(email) {
        var s = unescape(email);
        var re = /^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/
        if(re.test(s)) {
            alert("Valid Email");
            return true;
        }
        return false;
&#60;/script&gt;&lt;/code&gt;

Remember to have the following line in your "&#60;object&gt;&#60;param name="allowScriptAccess" value="always" /&gt;

As well as having the same attribute in your "&#60;embed&gt;" tag.
&lt;code&gt;
&#60;embed allowScriptAccess="always" /&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>The following is what I currently use in projects for validating email.  I use AS2/F8 and ExternalInterface, and it works wonderfully.  Remember that ExternalInterface is synchronous, so that you can do the following.<br />
<code><br />
var isValid = Boolean(flash.external.ExternalInterface.call("validate", emailTextInput.text));<br />
</code></p>
<p>Place this javascript in your &#8220;&lt;head>&#8221; tag.<br />
<code><br />
&lt;script type="text/javascript"><br />
    function validate(email) {<br />
        var s = unescape(email);<br />
        var re = /^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/<br />
        if(re.test(s)) {<br />
            alert(&#8221;Valid Email&#8221;);<br />
            return true;<br />
        }<br />
        return false;<br />
&lt;/script></code></p>
<p>Remember to have the following line in your &#8220;&lt;object>&lt;param name=&#8221;allowScriptAccess&#8221; value=&#8221;always&#8221; /></p>
<p>As well as having the same attribute in your &#8220;&lt;embed>&#8221; tag.<br />
<code><br />
&lt;embed allowScriptAccess="always" /><br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Ypes</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14580</link>
		<dc:creator>Michael Ypes</dc:creator>
		<pubDate>Thu, 03 Aug 2006 08:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-14580</guid>
		<description>Well what can I say, Your a god damn genius - Okay maybe thats a bit over the top :)
Already a big fan of the swfobject getting my multitude of emails a day. Why these people have to ask you te unsubscibe i just dont't know. You think they would be savvy enough to be able to do it themsleves???. Anyway searching the net for a regexp to get rid of a forward slash "/" and who's site should google pop up but yours. Great example as I am not the king of regexp and this did exactly what it said on the tin. How you have time to do your blog, swfobject and hold down a job i just don't know. Just keep doing it though as I am finding it really helpful at the mo. Cheers Dude.</description>
		<content:encoded><![CDATA[<p>Well what can I say, Your a god damn genius - Okay maybe thats a bit over the top :)<br />
Already a big fan of the swfobject getting my multitude of emails a day. Why these people have to ask you te unsubscibe i just dont&#8217;t know. You think they would be savvy enough to be able to do it themsleves???. Anyway searching the net for a regexp to get rid of a forward slash &#8220;/&#8221; and who&#8217;s site should google pop up but yours. Great example as I am not the king of regexp and this did exactly what it said on the tin. How you have time to do your blog, swfobject and hold down a job i just don&#8217;t know. Just keep doing it though as I am finding it really helpful at the mo. Cheers Dude.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ain Tohvri</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-13339</link>
		<dc:creator>Ain Tohvri</dc:creator>
		<pubDate>Mon, 12 Jun 2006 23:06:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-13339</guid>
		<description>This is great article indeed.

For whose of you who may require more complex expressions (esp in terms of replacements) I'd like to make a sample note I've used for generating email links within a textarea:
&lt;b&gt;regex&lt;/b&gt;
&lt;code&gt;
/([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+/g
&lt;/code&gt;
&lt;b&gt;replace pattern&lt;/b&gt; (replaces the email with an address itself)
&lt;code&gt;
&#60;a href='mailto:$0' target='_blank'&gt;$0&#60;/a&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This is great article indeed.</p>
<p>For whose of you who may require more complex expressions (esp in terms of replacements) I&#8217;d like to make a sample note I&#8217;ve used for generating email links within a textarea:<br />
<b>regex</b><br />
<code><br />
/([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+/g<br />
</code><br />
<b>replace pattern</b> (replaces the email with an address itself)<br />
<code><br />
&lt;a href='mailto:$0' target='_blank'>$0&lt;/a><br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-6506</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Sun, 30 Apr 2006 08:24:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-6506</guid>
		<description>This is a very usefull technic.
BTW, there is a problem when using reserved regexp patterns like s from the compiled swf.
The compiler analyse the backslash as an escaped character, and it doesn’t exists in actionscript tongue.
So that produce an error.

The only trick I’ve found is to escape the reserved pattern.
For example, to search any spaces in a string from the swf you’d call :
result:String = myRegExp.search ("/\s/g", “replaced");

I think that in more difficult patterns, that can be a problem.
Imagine yyou want to search a / in the string, do you have to triple escape the pattern ?
result:String = myRegExp.search ("/////g", “replaced");

Any thought ? 


Great resource. Really helpful for understand odbc things.

Thanks.

</description>
		<content:encoded><![CDATA[<p>This is a very usefull technic.<br />
BTW, there is a problem when using reserved regexp patterns like s from the compiled swf.<br />
The compiler analyse the backslash as an escaped character, and it doesn’t exists in actionscript tongue.<br />
So that produce an error.</p>
<p>The only trick I’ve found is to escape the reserved pattern.<br />
For example, to search any spaces in a string from the swf you’d call :<br />
result:String = myRegExp.search (&#8221;/\s/g&#8221;, “replaced&#8221;);</p>
<p>I think that in more difficult patterns, that can be a problem.<br />
Imagine yyou want to search a / in the string, do you have to triple escape the pattern ?<br />
result:String = myRegExp.search (&#8221;/////g&#8221;, “replaced&#8221;);</p>
<p>Any thought ? </p>
<p>Great resource. Really helpful for understand odbc things.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: laser hair removal</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-5750</link>
		<dc:creator>laser hair removal</dc:creator>
		<pubDate>Sat, 08 Apr 2006 12:28:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-5750</guid>
		<description>&lt;strong&gt;laser hair removal&lt;/strong&gt;
laser hair removal</description>
		<content:encoded><![CDATA[<p><strong>laser hair removal</strong><br />
laser hair removal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erixtekila</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4529</link>
		<dc:creator>erixtekila</dc:creator>
		<pubDate>Sat, 04 Feb 2006 12:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4529</guid>
		<description>This is a very usefull technic.
BTW, there is a problem when using reserved regexp patterns like \s from the compiled swf.
The compiler analyse the backslash as an escaped character, and it doesn't exists in actionscript tongue.
So that produce an error.

The only trick I've found is to escape the reserved pattern.
For example, to search any spaces in a string from the swf you'd call :
result:String = myRegExp.search ("/\s/g", "replaced");

I think that in more difficult patterns, that can be a problem.
Imagine yyou want to search a / in the string, do you have to triple escape the pattern ?
result:String = myRegExp.search ("/////g", "replaced");

Any thought ?</description>
		<content:encoded><![CDATA[<p>This is a very usefull technic.<br />
BTW, there is a problem when using reserved regexp patterns like \s from the compiled swf.<br />
The compiler analyse the backslash as an escaped character, and it doesn&#8217;t exists in actionscript tongue.<br />
So that produce an error.</p>
<p>The only trick I&#8217;ve found is to escape the reserved pattern.<br />
For example, to search any spaces in a string from the swf you&#8217;d call :<br />
result:String = myRegExp.search (&#8221;/\s/g&#8221;, &#8220;replaced&#8221;);</p>
<p>I think that in more difficult patterns, that can be a problem.<br />
Imagine yyou want to search a / in the string, do you have to triple escape the pattern ?<br />
result:String = myRegExp.search (&#8221;/////g&#8221;, &#8220;replaced&#8221;);</p>
<p>Any thought ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4346</link>
		<dc:creator>Geoff</dc:creator>
		<pubDate>Sat, 31 Dec 2005 17:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4346</guid>
		<description>Have you tried using &lt;code&gt;encode()&lt;/code&gt; or &lt;code&gt;encodeURIComponent()&lt;/code&gt; to encode the text before sending it over? Then you can use unescape or something to unencode it inside Flash.</description>
		<content:encoded><![CDATA[<p>Have you tried using <code>encode()</code> or <code>encodeURIComponent()</code> to encode the text before sending it over? Then you can use unescape or something to unencode it inside Flash.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Neuberg</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4342</link>
		<dc:creator>Brad Neuberg</dc:creator>
		<pubDate>Sat, 31 Dec 2005 10:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4342</guid>
		<description>I recently found a major bug in ExternalInterface. If the value you pass from JavaScript contains a newline, Flash corrupts the value. For example, if you had the following value:

helloworld1
helloworld2
helloworld3

And passed this from JavaScript to Flash (perhaps you got it from the user in an HTML textarea, and are passing it over to Flash), Flash will corrupt the value and turn it into a random number, which looks like some kind of internal memory pointer. I've found this on all browsers on all platforms I have tested (Mac and Windows, on IE, Firefox, and Safar). 

This bug is preventing me from using ExternalInterface for now.</description>
		<content:encoded><![CDATA[<p>I recently found a major bug in ExternalInterface. If the value you pass from JavaScript contains a newline, Flash corrupts the value. For example, if you had the following value:</p>
<p>helloworld1<br />
helloworld2<br />
helloworld3</p>
<p>And passed this from JavaScript to Flash (perhaps you got it from the user in an HTML textarea, and are passing it over to Flash), Flash will corrupt the value and turn it into a random number, which looks like some kind of internal memory pointer. I&#8217;ve found this on all browsers on all platforms I have tested (Mac and Windows, on IE, Firefox, and Safar). </p>
<p>This bug is preventing me from using ExternalInterface for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CeeJay</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4204</link>
		<dc:creator>CeeJay</dc:creator>
		<pubDate>Wed, 02 Nov 2005 05:09:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4204</guid>
		<description>Great example!  Flash 8.5 player will supposedly support regex with the AS3.0 release!  yippie!</description>
		<content:encoded><![CDATA[<p>Great example!  Flash 8.5 player will supposedly support regex with the AS3.0 release!  yippie!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apostille</title>
		<link>http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4043</link>
		<dc:creator>apostille</dc:creator>
		<pubDate>Tue, 30 Aug 2005 21:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.deconcept.com/2005/08/29/regexp-flash-8-using-externalinterface/#comment-4043</guid>
		<description>Really nice :)
Did you test/know the number of character max that we can send by ExternalInterface ?</description>
		<content:encoded><![CDATA[<p>Really nice :)<br />
Did you test/know the number of character max that we can send by ExternalInterface ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
