<?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>NewSourceMedia Blog &#187; hyper</title>
	<atom:link href="http://newsourcemedia.com/blog/tag/hyper/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Fri, 30 Dec 2011 04:30:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Javascript Non Alphanumeric Characters Regex</title>
		<link>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/</link>
		<comments>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascripts]]></category>
		<category><![CDATA[JS Forms]]></category>
		<category><![CDATA[alph]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[alphabetic]]></category>
		<category><![CDATA[alphanumeric]]></category>
		<category><![CDATA[alphnumeric]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[hyper]]></category>
		<category><![CDATA[hypertext]]></category>
		<category><![CDATA[javascript examples]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[letters]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[numeral]]></category>
		<category><![CDATA[numeric]]></category>
		<category><![CDATA[only]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2006/12/28/javascript-non-alphanumeric-characters-regex/</guid>
		<description><![CDATA[Using javascript regular expressions to stop users from entering non-aphanumeric characters or white spaces Say you want to stop users from entering non-aphanumeric characters or white spaces. Using regular expressions would be the easiest method: Here is my javascript code: &#8230; <a href="http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Using javascript regular expressions to stop users from entering non-aphanumeric characters or white spaces
<span id="more-175"></span>

Say you want to stop users from entering non-aphanumeric characters or white   spaces.

Using regular expressions would be the easiest method:

Here is my javascript code:

<code>&lt;script language="Javascript"&gt;
function alphaNumericCheck(){
var regex=/^[0-9A-Za-z]+$/; //^[a-zA-z]+$/
if(regex.test(document.add_data.password.value)){
alert("Good")
return true;
} else {
alert("Please fix: password")
return false;
}
}
&lt;/script&gt; </code>
For numbers only use /^[0-9]+$/

For mixed text and numbers, with spaces /^[0-9a-zA-Zs]+$/

Here are more useful regular expressions:

<code>[a-zA-Z] any letter
d any number; same as [0-9]
D any NOT number; same as [^0-9]
w any alphanumeric character; same as [a-zA-Z-0-9_]
W any NON-alphanumeric character; same as [^a-zA-Z0-9_]
s any whitespace (tab, space, newline, etc...)
S any NON-whitespace
n newline
t tab</code>

To view a full html sample of the above code click the links below using regular   expressions in JavaScript]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
