<?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>zParacha.com &#187; Most Popular Posts</title>
	<atom:link href="http://www.zparacha.com/category/most-popular-posts-on-zparacha/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zparacha.com</link>
	<description>Effective programming and blogging tips by Zaheer Paracha</description>
	<lastBuildDate>Wed, 09 Nov 2011 00:52:38 +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>Five free tools to choose perfect colors for your website.</title>
		<link>http://www.zparacha.com/free-color-tools-for-webdesigners/</link>
		<comments>http://www.zparacha.com/free-color-tools-for-webdesigners/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 06:03:07 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Most Popular Posts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[color wheel]]></category>
		<category><![CDATA[colorrotate]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[colourlovers]]></category>
		<category><![CDATA[kuler]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1061</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/free-color-tools-for-webdesigners/' addthis:title='Five free tools to choose perfect colors for your website.' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div>Color coordination plays a big role in the look and feel of a website. An appealing color scheme is an important prerequisite for eye catching web design. Dull or very sharp colors or mismatch colors will not only look ugly it may overshadow other nice elements of your website. Choosing vibrant, harmonious colors that are [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/free-color-tools-for-webdesigners/' addthis:title='Five free tools to choose perfect colors for your website.' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div><p><a href="http://www.zparacha.com/free-color-tools-for-webdesigners/">Five free tools to choose perfect colors for your website.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/css-color-chart/' rel='bookmark' title='Permanent Link: Colors by name with hex and RGB codes.'>Colors by name with hex and RGB codes.</a> <small>Today I stumbled upon a rather useful website. CSS Color...</small></li>
<li><a href='http://www.zparacha.com/top-10-tools-for-bloggers/' rel='bookmark' title='Permanent Link: Top 10 tools for bloggers.'>Top 10 tools for bloggers.</a> <small>If you are looking for ways to improve your blogging...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/free-color-tools-for-webdesigners/' addthis:title='Five free tools to choose perfect colors for your website.' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div><p><div id="attachment_1155" class="wp-caption alignleft" style="width: 310px"><a href="http://www.zparacha.com/free-color-tools-for-webdesigners/rainbow-colors/" rel="attachment wp-att-1155"><img src="http://www.zparacha.com/wp-content/uploads/2010/01/rainbow-colors-300x225.jpg" alt="rainbow colors 300x225 Five free tools to choose perfect colors for your website." title="rainbow-colors" width="300" height="225" class="size-medium wp-image-1155" /></a><p class="wp-caption-text">Rainbow colors</p></div><br />
Color coordination plays a big role in the look and feel of a website. An appealing color scheme is an important prerequisite for eye catching web design. Dull or very sharp colors or mismatch colors  will not only look ugly it may overshadow other nice elements of your website. Choosing vibrant, harmonious colors that are pleasant to eyes enhance the aesthetics appeal of a website. Following is a list of online resources you can use to construct the color schemes for your next web design project.<br />
<span id="more-1061"></span></p>
<p/>
<h4><a href="http://kuler.adobe.com/"> Kuler</a></h4>
<p><img src="http://www.zparacha.com/images/kuler.png" alt="kuler Five free tools to choose perfect colors for your website."  title="Five free tools to choose perfect colors for your website." /></p>
<p/>
Kuler is a featured-rich online color free tool from Adobe that you can use to create your color themes or browse through thousands of themes generated by community members. As a registered user you can save your themes and then view them in MyKuler. You can create themes using single color or by using color wheel.  You can also extract color scheme from your images, for that you can upload your images or import them from Flickr. Kuler is my favorite. </p>
<p/>
<h4><a href="http://www.colorotate.org/">ColorRotate:</a></h4>
<p><img src="http://www.zparacha.com/images/colorrotate.png" alt="colorrotate Five free tools to choose perfect colors for your website."  title="Five free tools to choose perfect colors for your website." />
<p/>
Like Adobe Kuler, Colorrotate is also a free, online tool to generate color templates, but this is a 3D tool. Its intuitive 3D interface is fun to use and it enables you to quickly see the multidimensional nature of your colors and the relationships between colors. You can use its drag-and-drop option to adjust hue, brightness, and saturation. You can load color themes from you images. It also has a vast collection of community generated themes that you can browse to get some inspiration. </p>
<p/>
<p><!--adsense#top--></p>
<h4><a href="http://colorschemedesigner.com">ColorSchemeDesinger</a></h4>
<p><img src="http://www.zparacha.com/images/colorscheme.png" alt="colorscheme Five free tools to choose perfect colors for your website."  title="Five free tools to choose perfect colors for your website." /></p>
<p/>ColorSchemeDesigner is another free, online tool to generate color palettes.  Its unique, easy-to-use color theme creator packs many useful featuers. You can generate single monochromatic, complimentary, triad, tetrad, analogic, and accented analogic color palettes.  Not only you can create the color palette , you can also user their preview function to apply your palette to a dummy web page, to see how your colors will look on your website. This will definitely save many designers lot of time.<br />
Another great feature is the ability to export  your color palette as a Photoshop palette, HTML+CSS, XML, TXT, and GPL .<br />
This tool does not work in IE6.</p>
<p/>
<h4><a href="http://www.colourlovers.com/">ColourLovers</a></h4>
<p><img src="http://www.zparacha.com/images/colorlover.png" alt="colorlover Five free tools to choose perfect colors for your website."  title="Five free tools to choose perfect colors for your website." /></p>
<p/>If you need color inspiration, you will love ColourLovers. Designers from all over the world share their creative ideas on this website. It has over 286,866 members and showcase more than 2,407,124 colors, 1,090,882 palettes and 732,299 patterns. You can create your own color palettes or just pick one from this enormous collection. </p>
<blockquote><p>
COLOURlovers  is a resource that monitors and influences color trends. COLOURlovers gives the people who use color &#8211; whether for ad campaigns, product design, or in architectural specification &#8211; a place to check out a world of color, compare color palettes, submit news and comments, and read color related articles and interviews.
</p></blockquote>
<p/>
<h4><a href="http://www.ficml.org/jemimap/style/color/wheel.html">4096 Color Wheel</a></h4>
<p><img src="http://www.zparacha.com/images/colorwheel.png" alt="colorwheel Five free tools to choose perfect colors for your website." style="border:1px solid #333;" title="Five free tools to choose perfect colors for your website." /></p>
<p/>If you don&#8217;t want all the bells and whistles of above mentioned tools, you may want to try Color Wheel. This is a simple web-based tool to view and choose web-safe colors. It offers you a palette of seven colors, displayed on the left side of the screen. You can change these 7 colors one by one by clicking on a color wheel. It is a nice little tool to generate a color palette.  </p>
<p>What are your favorite tools for creating color schemes?</p>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Ffree-color-tools-for-webdesigners%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Ffree-color-tools-for-webdesigners%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" title="Five free tools to choose perfect colors for your website." alt=" Five free tools to choose perfect colors for your website." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/free-color-tools-for-webdesigners/">Five free tools to choose perfect colors for your website.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Five free tools to choose perfect colors for your website. on zParacha.com: Effective Programming tips',url: 'http://www.zparacha.com/free-color-tools-for-webdesigners/',contentID: 'post-1061',signature: 'If you enjoyed this post, make sure you subscribe to my &lt;a href=\&quot;http://www.zparacha.com/feed/\&quot;&gt; RSS feed&lt;/a&gt;.',suggestTags: 'color wheel,colorrotate,colors,colourlovers,kuler,tools,webdesign',providerName: 'zParacha.com: Effective Programming tips',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-vert.png" class="evernoteSiteMemoryButton" title="Five free tools to choose perfect colors for your website." alt="article clipper vert Five free tools to choose perfect colors for your website." />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/free-color-tools-for-webdesigners/' addthis:title='Five free tools to choose perfect colors for your website.' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div>

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/css-color-chart/' rel='bookmark' title='Permanent Link: Colors by name with hex and RGB codes.'>Colors by name with hex and RGB codes.</a> <small>Today I stumbled upon a rather useful website. CSS Color...</small></li>
<li><a href='http://www.zparacha.com/top-10-tools-for-bloggers/' rel='bookmark' title='Permanent Link: Top 10 tools for bloggers.'>Top 10 tools for bloggers.</a> <small>If you are looking for ways to improve your blogging...</small></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/free-color-tools-for-webdesigners/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Five best free iPhone applications for bloggers</title>
		<link>http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/</link>
		<comments>http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 04:58:56 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Most Popular Posts]]></category>
		<category><![CDATA[free iPhone apps]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=599</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/' addthis:title='Five best free iPhone applications for bloggers' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div>Smart phones are a great tool for bloggers to blog even when they are away from their computers. Ever since iPhone was introduced mobile-blogging hit its stride. With a plethora of apps available for iPhone you can now easily post to your blog wherever you are. Although most iPhone apps have a modest price but [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/' addthis:title='Five best free iPhone applications for bloggers' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div><p><a href="http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/">Five best free iPhone applications for bloggers</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-tutorials-by-not-so-famous-bloggers/' rel='bookmark' title='Permanent Link: Best tutorials by not so famous bloggers'>Best tutorials by not so famous bloggers</a> <small>Last week DailyBlogTips invited bloggers to write turtorials as part...</small></li>
<li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/problogger-new-year-bonus/' rel='bookmark' title='Permanent Link: Jump-start your blog with free gifts from ProBlogger.'>Jump-start your blog with free gifts from ProBlogger.</a> <small>If one of your new year resolutions for 2010 is...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/' addthis:title='Five best free iPhone applications for bloggers' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div><p><div id="attachment_1165" class="wp-caption aligncenter" style="width: 286px"><a href="http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/iphone-2/" rel="attachment wp-att-1165"><img src="http://www.zparacha.com/wp-content/uploads/2009/10/iphone1-276x300.jpg" alt="iphone1 276x300 Five best free iPhone applications for bloggers" title="iphone" width="276" height="300" class="size-medium wp-image-1165" /></a><p class="wp-caption-text">iPhone</p></div><!--adsense#greyLeft-->Smart phones are a great tool for bloggers to blog even when they are away from their computers. Ever since <a href="http://www.apple.com/iphone">iPhone</a> was introduced mobile-blogging hit its stride. With a plethora of apps available for <a id="aptureLink_RqnsC0euux" href="http://www.amazon.com/gp/product/B001CL2CKW?tag=zaheparc-20">iPhone</a> you can now easily post to your blog wherever you are. Although most iPhone apps have a modest price but if you search hard you can find some gems of applications even for free. Following are five free but excellent  <a id="aptureLink_RqnsC0euux" href="http://www.amazon.com/gp/product/B001CL2CKW?tag=zaheparc-20">iPhone</a> apps that are immensely valuable for the bloggers on the move.<br />
<span id="more-599"></span></p>
<ul>
<li>
<h4><a href="http://itunes.com/app/wordpress">WordPress for iPhone:</a></h4>
<p><img class="alignright" src="http://www.zparacha.com/images/iPhone/wordpress.jpg" alt="wordpress Five best free iPhone applications for bloggers"  title="Five best free iPhone applications for bloggers" /><br />
If WordPress is your blogging platform and you have an iPhone you are in luck. <a id="aptureLink_1EcoW3rfcL" href="http://www.amazon.com/gp/product/1847193099?tag=zaheparc-20">WordPress</a> for iPhone is a free, open-source application that lets you create new or update existing posts and pages, upload images and manage comments on your blog from your iPhone. Just download the app, sign in using your admin user id and password and you are ready to roll. WordPress for iPhone supports both self-hosted and WordPress.com blogs. It is suitable for quick posts that do not need lot of formatting or too much typing.</li>
<li>
<h4><a href="http://mobile.photoshop.com/iphone/">Photoshop Mobile iPhone App</a></h4>
<p><img class="alignleft" src="http://www.zparacha.com/images/iPhone/photoshop.jpg" alt="photoshop Five best free iPhone applications for bloggers"  title="Five best free iPhone applications for bloggers" /><br />
This is by no means anything closer to desktop <a id="aptureLink_qkpOvHXieK" href="http://www.amazon.com/gp/product/0321492021?tag=zaheparc-20">Photoshop</a> software, but if you need some basic image transforming or editing on the go, Photoshop Mobile is <span style="text-decoration: line-through;">the best</span> an excellent free photo editing app. You can rotate, flip your photos, add borders , and apply a number of preset color effects simply by touching your iPhone screen. After you are done editing your photo you can either save it on your phone or upload it to a free 2GB photoshop.com account that you can use in your blog posts. You can <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=331975235&amp;mt=8"> download</a> the app from app store.</p>
<p><!--adsense#tla--></li>
<li>
<h4><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=281796108&amp;mt=8">Evernote for iPhone:</a></h4>
<p><img class="alignright" src="http://www.zparacha.com/images/iPhone/evernote.jpg" alt="evernote Five best free iPhone applications for bloggers"  title="Five best free iPhone applications for bloggers" /><br />
To me the ideal application to capture my thoughts or notes is the one that let me access my notes when I need them. The immensely popular note-taking application Evernote fills the bill. With its free application for iPhone you have access to all your stored notes from almost anywhere.</p>
<blockquote><p>Evernote for iPhone lets you create notes, snap photos, and record voice memos that you can then access any time — from your iPhone, computer, or the web.</p></blockquote>
</li>
<li>
<h4><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=286756410&amp;mt=8">EchoFon (formerly TwitterFon) for iPhone</a></h4>
<p><img class="alignleft" src="http://www.zparacha.com/images/iPhone/echofon.jpg" alt="echofon Five best free iPhone applications for bloggers"  title="Five best free iPhone applications for bloggers" /><br />
Twitter is a great social network to promote your blog and inform your readers of the latest posts on your blog. Twitter 140-character status makes it an ideal candidate for iPhone app. With Twitter clients for iPhone you can update your status at any time. There are several Twitter clients available for iPhone but if you don&#8217;t want to spend 2 &#8211; 4 dollars try Echophone. Personally, I like it better than another popular free iPhone Twitter client, TweetDeck. You can follow your friends, update your status, search for current trends. The feature I like the most is the ability to open the URL in Safari instead of just viewing it in the built-in web browser. You can also email the URL to your friends. Another useful feature is the ability to tweet on web page you are visiting in the EchoFon browser.</li>
<li>
<h4><a href="itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=327630330&amp;mt=8&amp;s=143441">Dropbox</a></h4>
<p><img class="alignright" src="http://www.zparacha.com/images/iPhone/dropbox.jpg" alt="dropbox Five best free iPhone applications for bloggers"  title="Five best free iPhone applications for bloggers" /><br />
I am a great fan of cloud file storing and sharing service <a href="https://www.dropbox.com/referrals/NTMyNDM1OQ">Dropbox</a>. I have written about this service <a href="http://www.zparacha.com/share_files_with_dropbox/"> before</a>. Dropbox for iPhone is also gaining popularity.<br />
To use this app you will need to sign-up for a free Dropbox account and install DropBox application on your computer also. After that you can view your files stored in DropBox folder from your iPhone.</li>
</ul>
<p>Have you ever blogged from your iPhone? If yes what are your favorite iPhone apps for blogging.</p>
<p><span style="font-size:10px;color:#000;">Image credit:<a href="http://www.flickr.com/photos/dotdean/">dotdean</a></span>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Ffive-best-free-iphone-applications-for-bloggers%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Ffive-best-free-iphone-applications-for-bloggers%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" title="Five best free iPhone applications for bloggers" alt=" Five best free iPhone applications for bloggers" /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/">Five best free iPhone applications for bloggers</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Five best free iPhone applications for bloggers on zParacha.com: Effective Programming tips',url: 'http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/',contentID: 'post-599',signature: 'If you enjoyed this post, make sure you subscribe to my &lt;a href=\&quot;http://www.zparacha.com/feed/\&quot;&gt; RSS feed&lt;/a&gt;.',suggestTags: 'Blogging,free iPhone apps,iPhone',providerName: 'zParacha.com: Effective Programming tips',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-vert.png" class="evernoteSiteMemoryButton" title="Five best free iPhone applications for bloggers" alt="article clipper vert Five best free iPhone applications for bloggers" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/' addthis:title='Five best free iPhone applications for bloggers' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div>

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-tutorials-by-not-so-famous-bloggers/' rel='bookmark' title='Permanent Link: Best tutorials by not so famous bloggers'>Best tutorials by not so famous bloggers</a> <small>Last week DailyBlogTips invited bloggers to write turtorials as part...</small></li>
<li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/problogger-new-year-bonus/' rel='bookmark' title='Permanent Link: Jump-start your blog with free gifts from ProBlogger.'>Jump-start your blog with free gifts from ProBlogger.</a> <small>If one of your new year resolutions for 2010 is...</small></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/five-best-free-iphone-applications-for-bloggers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to determine smallest and largest number in Java</title>
		<link>http://www.zparacha.com/determine-smallest-largest-number-java/</link>
		<comments>http://www.zparacha.com/determine-smallest-largest-number-java/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 04:16:59 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Most Popular Posts]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=535</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/determine-smallest-largest-number-java/' addthis:title='How to determine smallest and largest number in Java' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div>A couple of weeks ago a reader asked me for a Java program to read command-line input from the user and then display the smallest value the user has entered. He wanted to use digit &#8217;0&#8242; to indicate that the user is done entering the data and not to include 0 in the list of [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/determine-smallest-largest-number-java/' addthis:title='How to determine smallest and largest number in Java' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div><p><a href="http://www.zparacha.com/determine-smallest-largest-number-java/">How to determine smallest and largest number in Java</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/' rel='bookmark' title='Permanent Link: Sort numbers in Java to find minimum and maximum values without using Array'>Sort numbers in Java to find minimum and maximum values without using Array</a> <small>Recently a reader contacted me with a question about sorting...</small></li>
<li><a href='http://www.zparacha.com/colorpix-free-utility-to-determine-the-hex-code-of-any-color/' rel='bookmark' title='Permanent Link: ColorPix. Free utility to determine the hex code of any color.'>ColorPix. Free utility to determine the hex code of any color.</a> <small>Ever wanted to use a shade of color you found...</small></li>
<li><a href='http://www.zparacha.com/best-way-to-check-if-a-java-string-is-a-number/' rel='bookmark' title='Permanent Link: Best way to check if a Java String is a number.'>Best way to check if a Java String is a number.</a> <small>An example on how to validate if a String variable...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/determine-smallest-largest-number-java/' addthis:title='How to determine smallest and largest number in Java' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div><p><div id="attachment_1168" class="wp-caption alignleft" style="width: 310px"><a href="http://www.zparacha.com/determine-smallest-largest-number-java/numbers/" rel="attachment wp-att-1168"><img src="http://www.zparacha.com/wp-content/uploads/2009/10/numbers-300x141.jpg" alt="numbers 300x141 How to determine smallest and largest number in Java" title="numbers" width="300" height="141" class="size-medium wp-image-1168" /></a><br />
<p class="wp-caption-text">Numbers</p></div><br />
A couple of weeks ago a reader asked me for a Java program to read command-line input from the user and then display the smallest value the user has entered. He wanted to use digit &#8217;0&#8242; to indicate that the user is done entering the data and not to include 0 in the list of numbers entered by the user. Here is the Java code to do this. Bonus: This program also determines the largest value entered by the user.<br />
<span id="more-535"></span><br />
<!--adsense#tla--></p>
<pre><code>
import java.io.*;
import java.util.*;
public class ReadInputNumbers {
      public static void main (String[] args) {
      System.out.print("Enter numbers. Enter 0 after you have
entered  all numbers. \n");
      BufferedReader br = new BufferedReader(
                               new InputStreamReader(System.in));
      String numberStr = "1";
      ArrayList inputNumbers = new ArrayList();
      Integer intNumber =-999;
      while(intNumber != 0){
 	 try {
		numberStr = br.readLine();
		intNumber = new Integer(numberStr);
		if(intNumber != 0){
		   inputNumbers.add(new Integer(numberStr));
		}
	} catch (IOException ioe) {
	   System.out.println("IO error trying to read input!");
	   System.exit(1);
	}catch(NumberFormatException e){
	   System.out.println("You entered an invalid number
                                   ("+numberStr+").");
	   System.exit(1);
	}
      }
      Collections.sort(inputNumbers);
      Iterator itr = inputNumbers.iterator();
      if(!inputNumbers.isEmpty()){
	 System.out.println("You entered..." + inputNumbers);
	 System.out.println("Smallest value you entered is " +
                         inputNumbers.get(0));
 	 System.out.println("Largest value you entered is " +
                        inputNumbers.get(inputNumbers.size()-1));
	}else{
	  System.out.println("You did not enter any number.");
	}
   }
}
</code></pre>
<p><!--adsense#greyLeft--><br />
Enjoy. </p>
<p><span style="font-size:10px;color:#000;">Image credit:<a href="http://www.flickr.com/photos/baylorbear78/">BaylorBear78</a></span>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fdetermine-smallest-largest-number-java%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fdetermine-smallest-largest-number-java%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" title="How to determine smallest and largest number in Java" alt=" How to determine smallest and largest number in Java" /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/determine-smallest-largest-number-java/">How to determine smallest and largest number in Java</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'How to determine smallest and largest number in Java on zParacha.com: Effective Programming tips',url: 'http://www.zparacha.com/determine-smallest-largest-number-java/',contentID: 'post-535',signature: 'If you enjoyed this post, make sure you subscribe to my &lt;a href=\&quot;http://www.zparacha.com/feed/\&quot;&gt; RSS feed&lt;/a&gt;.',suggestTags: '',providerName: 'zParacha.com: Effective Programming tips',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-vert.png" class="evernoteSiteMemoryButton" title="How to determine smallest and largest number in Java" alt="article clipper vert How to determine smallest and largest number in Java" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/determine-smallest-largest-number-java/' addthis:title='How to determine smallest and largest number in Java' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div>

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/' rel='bookmark' title='Permanent Link: Sort numbers in Java to find minimum and maximum values without using Array'>Sort numbers in Java to find minimum and maximum values without using Array</a> <small>Recently a reader contacted me with a question about sorting...</small></li>
<li><a href='http://www.zparacha.com/colorpix-free-utility-to-determine-the-hex-code-of-any-color/' rel='bookmark' title='Permanent Link: ColorPix. Free utility to determine the hex code of any color.'>ColorPix. Free utility to determine the hex code of any color.</a> <small>Ever wanted to use a shade of color you found...</small></li>
<li><a href='http://www.zparacha.com/best-way-to-check-if-a-java-string-is-a-number/' rel='bookmark' title='Permanent Link: Best way to check if a Java String is a number.'>Best way to check if a Java String is a number.</a> <small>An example on how to validate if a String variable...</small></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/determine-smallest-largest-number-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate Zip code using JavaScript Regular expression</title>
		<link>http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/</link>
		<comments>http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 17:37:24 +0000</pubDate>
		<dc:creator>Zaheer</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Most Popular Posts]]></category>
		<category><![CDATA[RegEx]]></category>
		<category><![CDATA[Regular Expression]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/' addthis:title='Validate Zip code using JavaScript Regular expression' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div>Continuing with my series of JavaScript regular expression today we will see how easy it is to validate zip code using regular expression in JavaScript. Previously we talked about validating email and Social Security number using JS regex. In today&#8217;s post I&#8217;ll show you how to use JavaScript regular expression to validate zip code. Let [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/' addthis:title='Validate Zip code using JavaScript Regular expression' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div><p><a href="http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/">Validate Zip code using JavaScript Regular expression</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/phone_number_regex/' rel='bookmark' title='Permanent Link: Validate U.S Phone Numbers using JavaScript Regular expression.'>Validate U.S Phone Numbers using JavaScript Regular expression.</a> <small>Photo credit: aussiegall Continuing with our JavaScript regular expression series...</small></li>
<li><a href='http://www.zparacha.com/validate-email-address-using-javascript-regular-expression/' rel='bookmark' title='Permanent Link: Validate email address using JavaScript regular expression'>Validate email address using JavaScript regular expression</a> <small>Last month I wrote about regular expressions in Java, today...</small></li>
<li><a href='http://www.zparacha.com/validate-social-security-number-using-javascript-regular-expressions/' rel='bookmark' title='Permanent Link: How to validate Social Security Number (SSN) using JavaScript Regular Expressions'>How to validate Social Security Number (SSN) using JavaScript Regular Expressions</a> <small>When I wrote the JS regular expression article last week...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/' addthis:title='Validate Zip code using JavaScript Regular expression' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div><p><div id="attachment_1172" class="wp-caption alignleft" style="width: 310px"><a href="http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/zipcode/" rel="attachment wp-att-1172"><img src="http://www.zparacha.com/wp-content/uploads/2008/02/zipcode-300x199.jpg" alt="zipcode 300x199 Validate Zip code using JavaScript Regular expression" title="zipcode" width="300" height="199" class="size-medium wp-image-1172" /></a><p class="wp-caption-text">Zip Code</p></div>Continuing with my series of JavaScript regular expression today we will see how easy it is to validate zip code using regular expression in JavaScript.  Previously we talked about validating <a href="http://www.zparacha.com/validate-email-address-using-javascript-regular-expression/">email</a> and <a href="http://www.zparacha.com/more-javascript-regular-expressions/">Social Security number</a> using JS regex.</p>
<p>In today&#8217;s post I&#8217;ll show you how to use JavaScript regular expression to validate zip code. Let me first show you the JS code.</p>
<pre><code>
function validateZipCode(elementValue){
    var zipCodePattern = /^\d{5}$|^\d{5}-\d{4}$/;
     return zipCodePattern.test(elementValue);
}
</code></pre>
<p><!--adsense#green1--></p>
<h4>Explanation:</h4>
<p>The argument to this method is the zip code you want to validate.</p>
<p>In the method body we define a variable (&#8216;zipCodePattern&#8217;) and assign a regular expression to it.</p>
<p><strong>ZipCode format</strong>: The regular expression for zip code is</p>
<p><span id="more-76"></span></p>
<p><strong>/^\d{5}$|^\d{5}-\d{4}$/</strong></p>
<p>This is quite a simple regular expression.</p>
<p><!--adsense#text_ad--></p>
<p>What we are saying here is that a valid zip code can either have 5 digits or 5 digits followed by an hyphen(-) and ends with four digits. So, zip codes 38980 and 83900-8789 will pass validation. However, 83900- or 839008789 will not pass our validation test.<br />
If you don&#8217;t want to have a zip+4 format you can use <strong>/^\d{5}$/</strong> as the regular expression to validate simple zip code.</p>
<p><span style="font-size:10px;color:#333;">Image credit:<a href="http://www.flickr.com/photos/smcgee/">smcgee</a></span>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fvalidate-zip-code-using-javascript-regular-expression%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fvalidate-zip-code-using-javascript-regular-expression%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" title="Validate Zip code using JavaScript Regular expression" alt=" Validate Zip code using JavaScript Regular expression" /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/">Validate Zip code using JavaScript Regular expression</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Validate Zip code using JavaScript Regular expression on zParacha.com: Effective Programming tips',url: 'http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/',contentID: 'post-76',signature: 'If you enjoyed this post, make sure you subscribe to my &lt;a href=\&quot;http://www.zparacha.com/feed/\&quot;&gt; RSS feed&lt;/a&gt;.',suggestTags: 'Javascript,RegEx,Regular Expression',providerName: 'zParacha.com: Effective Programming tips',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-vert.png" class="evernoteSiteMemoryButton" title="Validate Zip code using JavaScript Regular expression" alt="article clipper vert Validate Zip code using JavaScript Regular expression" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/' addthis:title='Validate Zip code using JavaScript Regular expression' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div>

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/phone_number_regex/' rel='bookmark' title='Permanent Link: Validate U.S Phone Numbers using JavaScript Regular expression.'>Validate U.S Phone Numbers using JavaScript Regular expression.</a> <small>Photo credit: aussiegall Continuing with our JavaScript regular expression series...</small></li>
<li><a href='http://www.zparacha.com/validate-email-address-using-javascript-regular-expression/' rel='bookmark' title='Permanent Link: Validate email address using JavaScript regular expression'>Validate email address using JavaScript regular expression</a> <small>Last month I wrote about regular expressions in Java, today...</small></li>
<li><a href='http://www.zparacha.com/validate-social-security-number-using-javascript-regular-expressions/' rel='bookmark' title='Permanent Link: How to validate Social Security Number (SSN) using JavaScript Regular Expressions'>How to validate Social Security Number (SSN) using JavaScript Regular Expressions</a> <small>When I wrote the JS regular expression article last week...</small></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to validate email, SSN, phone number in Java using Regular expressions.</title>
		<link>http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/</link>
		<comments>http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 04:04:53 +0000</pubDate>
		<dc:creator>Zaheer</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Most Popular Posts]]></category>
		<category><![CDATA[Phone number]]></category>
		<category><![CDATA[RegEx]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[SSN]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[Validate email]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/java_regex_validation/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/' addthis:title='How to validate email, SSN, phone number in Java using Regular expressions.' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div>Regular Expressions offer a concise and powerful search-and-replace mechanism. They are patterns of characters used to perform search, extract or replace operations on the given text. Regular expressions can also be used to validate that the input conforms to a given format. For example, we can use Regular Expression to check whether the user input [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/' addthis:title='How to validate email, SSN, phone number in Java using Regular expressions.' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div><p><a href="http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/">How to validate email, SSN, phone number in Java using Regular expressions.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/ultimate-java-regular-expression-to-validate-email-address/' rel='bookmark' title='Permanent Link: Ultimate Java Regular Expression to validate any email address.'>Ultimate Java Regular Expression to validate any email address.</a> <small>My post about Java regular expression gets a lot of...</small></li>
<li><a href='http://www.zparacha.com/how-to-validate-date-using-java-regular-expression/' rel='bookmark' title='Permanent Link: How to validate date using Java regular expression'>How to validate date using Java regular expression</a> <small>My earlier post on how to validate email address, SSN...</small></li>
<li><a href='http://www.zparacha.com/phone_number_regex/' rel='bookmark' title='Permanent Link: Validate U.S Phone Numbers using JavaScript Regular expression.'>Validate U.S Phone Numbers using JavaScript Regular expression.</a> <small>Photo credit: aussiegall Continuing with our JavaScript regular expression series...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/' addthis:title='How to validate email, SSN, phone number in Java using Regular expressions.' ><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a></div><p><!--adsense#336By280--><br />
<div id="attachment_1178" class="wp-caption alignnone" style="width: 310px"><a href="http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/3d-people-and-symbol-internet/" rel="attachment wp-att-1178"><img src="http://www.zparacha.com/wp-content/uploads/2008/01/email-300x225.jpg" alt="email 300x225 How to validate email, SSN, phone number in Java using Regular expressions." title="Email" width="300" height="225" class="size-medium wp-image-1178" /></a><p class="wp-caption-text">Email</p></div></p>
<p><!-- google_ad_section_start --><a id="aptureLink_lGrMl4fHnX" href="http://www.amazon.com/gp/product/0596514271?tag=zaheparc-20">Regular Expressions</a> offer a concise and powerful search-and-replace mechanism.<br />
They are patterns of characters used to perform  search, extract or replace operations on the given text. Regular expressions can also be used to validate that the input conforms to a given format.</p>
<p>For example, we can use Regular Expression to check whether the user input is a valid Social Security number, a valid phone number or a valid email number, etc.<br />
<span id="more-50"></span><br />
Regular Expressions are supported by many languages. Sun added support for regular expression in Java 1.4 by introducing java.util.regex package. This package provides the necessary classes for using Regular Expressions in a java application. It consists of following three main classes ,</p>
<ul>
<li> Pattern</li>
<li> Matcher</li>
<li> PatternSyntaxException</li>
</ul>
<p><!-- google_ad_section_end --><br />
<!--sadsense#336By280--><br />
The java.util.regex package has several other features for appending, text replacement, and greedy/non-greedy pattern matching. See the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/package-summary.html">JDK  Documentation</a> on java.util.regex to learn more about using regular expressions in Java.</p>
<p>Using this package I created a utility class to validate some commonly used data elements. My FieldsValidation class has following methods: <!--more--></p>
<h3>1. isEmailValid:</h3>
<p><!-- google_ad_section_start --><br />
Validate email address using Java regex</p>
<pre name="code" class="java">
/** isEmailValid: Validate email address using Java reg ex.
* This method checks if the input string is a valid email address.
* @param email String. Email address to validate
* @return boolean: true if email address is valid, false otherwise.
*/
<!-- google_ad_section_end-->
public static boolean isEmailValid(String email){
boolean isValid = false;

/*
Email format: A valid email address will have following format:
        [\\w\\.-]+: Begins with word characters, (may include periods and hypens).
	@: It must have a '@' symbol after initial characters.
	([\\w\\-]+\\.)+: '@' must follow by more alphanumeric characters (may include hypens.).
This part must also have a "." to separate domain and subdomain names.
	[A-Z]{2,4}$</strong> : Must end with two to four alaphabets.
(This will allow domain names with 2, 3 and 4 characters e.g pa, com, net, wxyz)

Examples: Following email addresses will pass validation
abc@xyz.net; ab.c@tx.gov
*/

//Initialize reg ex for email.
String expression = "^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}$";
CharSequence inputStr = email;
//Make the comparison case-insensitive.
Pattern pattern = Pattern.compile(expression,Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(inputStr);
if(matcher.matches()){
isValid = true;
}
return isValid;
}
</pre>
<p><em><strong>Update</strong>: Read this post for a more thorough <a href="http://www.zparacha.com/ultimate-java-regular-expression-to-validate-email-address/"> Java regular expression to validate email address</a>.<br />
</em></p>
<h3>2. isPhoneNumberValid:</h3>
<p>Validate phone number using Java reg ex.</p>
<pre name="code" class="java">
/** isPhoneNumberValid: Validate phone number using Java reg ex.
* This method checks if the input string is a valid phone number.
* @param email String. Phone number to validate
* @return boolean: true if phone number is valid, false otherwise.
*/
public static boolean isPhoneNumberValid(String phoneNumber){
boolean isValid = false;
/* Phone Number formats: (nnn)nnn-nnnn; nnnnnnnnnn; nnn-nnn-nnnn
	^\\(?</strong> : May start with an option "(" .
	(\\d{3})</strong>: Followed by 3 digits.
	\\)?</strong> : May have an optional ")"
	[- ]?</strong> : May have an optional "-" after the first 3 digits or after optional ) character.
	(\\d{3})</strong> : Followed by 3 digits.
	 [- ]? </strong>: May have another optional "-" after numeric digits.
	 (\\d{4})$</strong> : ends with four digits.

         Examples: Matches following phone numbers:
         (123)456-7890, 123-456-7890, 1234567890, (123)-456-7890

*/
//Initialize reg ex for phone number. </codecomments>
String expression = "^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$";
CharSequence inputStr = phoneNumber;
Pattern pattern = Pattern.compile(expression);
Matcher matcher = pattern.matcher(inputStr);
if(matcher.matches()){
isValid = true;
}
return isValid;
}
</pre>
<p><!--sadsense#tla--></p>
<h3>3. isValidSSN:</h3>
<p>Validate Social Security Number (SSN) using Java reg ex.</p>
<pre name="code" class="java">
/** isSSNValid: Validate Social Security number (SSN) using Java reg ex.
* This method checks if the input string is a valid SSN.
* @param email String. Social Security number to validate
* @return boolean: true if social security number is valid, false otherwise.
*/
 public static boolean isSSNValid(String ssn){
boolean isValid = false;
 /*SSN format xxx-xx-xxxx, xxxxxxxxx, xxx-xxxxxx; xxxxx-xxxx:
         ^\\d{3}: Starts with three numeric digits.
	[- ]?: Followed by an optional "-"
	\\d{2}: Two numeric digits after the optional "-"
	[- ]?: May contain an optional second "-" character.
	\\d{4}: ends with four numeric digits.

        Examples: 879-89-8989; 869878789 etc.
*/

//Initialize reg ex for SSN. </codecomments>
String expression = "^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$";
CharSequence inputStr = ssn;
Pattern pattern = Pattern.compile(expression);
Matcher matcher = pattern.matcher(inputStr);
if(matcher.matches()){
isValid = true;
}
return isValid;
}
</pre>
<h3>4. isNumeric:</h3>
<p>Validate a number using Java regex.</p>
<pre name="code" class="java">
/** isNumeric: Validate a number using Java regex.
* This method checks if the input string contains all numeric characters.
* @param email String. Number to validate
* @return boolean: true if the input is all numeric, false otherwise.
*/

public static boolean isNumeric(String number){
boolean isValid = false;

/*Number: A numeric value will have following format:
         ^[-+]?: Starts with an optional "+" or "-" sign.
	 [0-9]*: May have one or more digits.
	\\.?</strong> : May contain an optional "." (decimal point) character.
	[0-9]+$</strong> : ends with numeric digit.
*/

//Initialize reg ex for numeric data.
String expression = "^[-+]?[0-9]*\\.?[0-9]+$";
CharSequence inputStr = number;
Pattern pattern = Pattern.compile(expression);
Matcher matcher = pattern.matcher(inputStr);
if(matcher.matches()){
isValid = true;
}
return isValid;
}
</pre>
<p><!--adsense#greyLeft--></p>
<p>This example demonstrates how easy it is to validate email address, SSN, phone number in Java using regular expressions. You can read more about regular expression format <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html"> here </a> .</p>
<p>You can download complete Java code for this class <a href="/examples/FieldsValidation.java"> here </a>.</p>
<p>Feel free to modify and use this class in your projects. Let me know if you have any questions or comments.</p>
<p>Enjoy.</p>
<p><span style="font-size:10px; color:#000;"><a href="http://www.flickr.com/photos/crystaljingsr/">crystaljingsr</a></span>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fvalidate-email-ssn-phone-number-using-java-regular-expression%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fvalidate-email-ssn-phone-number-using-java-regular-expression%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" title="How to validate email, SSN, phone number in Java using Regular expressions." alt=" How to validate email, SSN, phone number in Java using Regular expressions." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/">How to validate email, SSN, phone number in Java using Regular expressions.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'How to validate email, SSN, phone number in Java using Regular expressions. on zParacha.com: Effective Programming tips',url: 'http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/',contentID: 'post-50',signature: 'If you enjoyed this post, make sure you subscribe to my &lt;a href=\&quot;http://www.zparacha.com/feed/\&quot;&gt; RSS feed&lt;/a&gt;.',suggestTags: 'Java,Phone number,RegEx,Regular Expression,SSN,utility,Validate email',providerName: 'zParacha.com: Effective Programming tips',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-vert.png" class="evernoteSiteMemoryButton" title="How to validate email, SSN, phone number in Java using Regular expressions." alt="article clipper vert How to validate email, SSN, phone number in Java using Regular expressions." />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/' addthis:title='How to validate email, SSN, phone number in Java using Regular expressions.' ><a class="addthis_button_googlereader"></a><a class="addthis_button_email"></a><a class="addthis_button_google"></a><a class="addthis_button_twitter"></a><a class="addthis_button_google_plusone"></a><a class="addthis_button_facebook_like"></a><a class="addthis_button_compact"></a></div>

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/ultimate-java-regular-expression-to-validate-email-address/' rel='bookmark' title='Permanent Link: Ultimate Java Regular Expression to validate any email address.'>Ultimate Java Regular Expression to validate any email address.</a> <small>My post about Java regular expression gets a lot of...</small></li>
<li><a href='http://www.zparacha.com/how-to-validate-date-using-java-regular-expression/' rel='bookmark' title='Permanent Link: How to validate date using Java regular expression'>How to validate date using Java regular expression</a> <small>My earlier post on how to validate email address, SSN...</small></li>
<li><a href='http://www.zparacha.com/phone_number_regex/' rel='bookmark' title='Permanent Link: Validate U.S Phone Numbers using JavaScript Regular expression.'>Validate U.S Phone Numbers using JavaScript Regular expression.</a> <small>Photo credit: aussiegall Continuing with our JavaScript regular expression series...</small></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/validate-email-ssn-phone-number-using-java-regular-expression/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
	</channel>
</rss>

