<?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>Cyberactiva web development and optimisation &#187; DotNet</title>
	<atom:link href="http://www.cyberactiva.com/category/dotnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberactiva.com</link>
	<description>Every day&#039;s life about programming and webmarketing</description>
	<lastBuildDate>Mon, 11 Apr 2011 05:15:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>EASY REGULAR EXPRESSIONS IN C#</title>
		<link>http://www.cyberactiva.com/2009/09/easy-regular-expressions-in-c/</link>
		<comments>http://www.cyberactiva.com/2009/09/easy-regular-expressions-in-c/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 09:41:44 +0000</pubDate>
		<dc:creator>Claudio Barba</dc:creator>
				<category><![CDATA[DotNet]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://lnx.cyberactiva.com/?p=8</guid>
		<description><![CDATA[<p>I really love using regular expressions.
It&#8217;s so easy to check strings&#8230; for example if you want only alphanumeric or only numbers or a very specific format like two letters, one point, one number and a #, in the specific order.
In my opinion, it&#8217;s highly difficult to create the reg exp from scratch.
I have found a [...]]]></description>
			<content:encoded><![CDATA[<p>I really love using regular expressions.<br />
It&#8217;s so easy to check strings&#8230; for example if you want only alphanumeric or only numbers or a very specific format like two letters, one point, one number and a #, in the specific order.<br />
In my opinion, it&#8217;s highly difficult to create the reg exp from scratch.<br />
I have found a very good shareware program which build and test them for me. <a href="http://www.ultrapico.com/">You can find it here.</a></p>
<p>Once you have your regular expression, how can you use it in your code?<br />
Let&#8217;s say you just need to check if a string is composed only by alphanumeric chars.</p>
<p>Here&#8217;s a bit of C# code:</p>
<p><strong><span style="font-family:arial;font-size:85%;color:#3333ff;">string mystring = &#8220;HELLO&#8221;;<br />
string regExpString = &#8220;^\\w+$&#8221;;</span></strong></p>
<p><strong><span style="font-family:arial;font-size:85%;color:#3333ff;">if (System.Text.RegularExpressions.Regex.IsMatch( mystring , regExpString))<br />
//here mystring contains only alphanumerics<br />
else<br />
// here mystring contains also something else</span></strong></p>
<p>So&#8230; isn&#8217;t it easy?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberactiva.com/2009/09/easy-regular-expressions-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

