<?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>Dushyanth Jyothi &#187; Regular expressions</title>
	<atom:link href="http://dushi.co.uk/tag/regular-expressions/feed/" rel="self" type="application/rss+xml" />
	<link>http://dushi.co.uk</link>
	<description>Me, My Life and the Binary</description>
	<lastBuildDate>Thu, 22 Jul 2010 21:14:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>.net Regular Expressions String Match Replace</title>
		<link>http://dushi.co.uk/20/07/2009/net-regular-expressions-string-match-replace/</link>
		<comments>http://dushi.co.uk/20/07/2009/net-regular-expressions-string-match-replace/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 13:14:57 +0000</pubDate>
		<dc:creator>Dushyanth Jyothi</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[Regular expressions]]></category>
		<category><![CDATA[string match]]></category>
		<category><![CDATA[string replace]]></category>

		<guid isPermaLink="false">http://dushi.co.uk/?p=82</guid>
		<description><![CDATA[.net Regular Expressions String Match ReplaceString Match using regular expressions &#8211; VB.net&#160;vb.net&#160;&#124;&#160;&#160;copy&#160;code&#160;&#124;?&#160;1Import Imports System.Text.RegularExpressions2&#160;3            'regularExpression_Match -&#62; regular expression pattern to macth4            Dim regularExpression_Match As New Regex&#40;&#34;(.*)REGULAR EXPRESSION MATCH PATTERN(.*)&#34;&#41;5     [...]]]></description>
			<content:encoded><![CDATA[<strong>.net Regular Expressions String Match Replace</strong><br /><br /><br /><strong>String Match using regular expressions &#8211; VB.net</strong><br /><br /><pre class="devcodeblock" title="vb.net"><table class="devcodetools"><tbody><tr><td>&nbsp;vb.net&nbsp;|&nbsp;</td><td style="background-image:url('http://dushi.co.uk/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard4" src="http://dushi.co.uk/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=4&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline">Import <span style="color: #0600FF;">Imports</span> System.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">RegularExpressions</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">&nbsp;</pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline">            <span style="color: #008080; font-style: italic;">'regularExpression_Match -&gt; regular expression pattern to macth</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">4</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">            <span style="color: #0600FF;">Dim</span> regularExpression_Match <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">New</span> Regex<span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;(.*)REGULAR EXPRESSION MATCH PATTERN(.*)&quot;</span><span style="color: #000000;">&#41;</span></pre></td></tr><tr><td class="devcodelines" width="1%">5</td><td class="devcodelinesarea"><pre class="devcode devcodeline">            <span style="color: #008080; font-style: italic;">'txtInput.txt -&gt; Text to macth against regularExpression_Match pattern</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">6</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">            <span style="color: #0600FF;">Dim</span> myMatch <span style="color: #FF8000;">As</span> Match <span style="color: #008000;">=</span> System.<span style="color: #0000FF;">Text</span>.<span style="color: #0000FF;">RegularExpressions</span>.<span style="color: #0000FF;">Regex</span>.<span style="color: #0000FF;">Match</span><span style="color: #000000;">&#40;</span>txtInput.<span style="color: #0000FF;">Text</span>, regularExpression_Match<span style="color: #000000;">&#41;</span></pre></td></tr><tr><td class="devcodelines" width="1%">7</td><td class="devcodelinesarea"><pre class="devcode devcodeline">            <span style="color: #0600FF;">If</span> myMatch.<span style="color: #0000FF;">Success</span> <span style="color: #FF8000;">Then</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">8</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">                <span style="color: #008080; font-style: italic;">'Do Something</span></pre></td></tr><tr><td class="devcodelines" width="1%">9</td><td class="devcodelinesarea"><pre class="devcode devcodeline">            <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span></pre></td></tr></table></div></pre>
<br /><pre class="devcodeblock" title="vb.net"><table class="devcodetools"><tbody><tr><td>&nbsp;vb.net&nbsp;|&nbsp;</td><td style="background-image:url('http://dushi.co.uk/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard5" src="http://dushi.co.uk/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=5&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">1</td><td class="devcodelinesarea"><pre class="devcode devcodeline"><span style="color: #0600FF;">If</span> Regex.<span style="color: #0000FF;">IsMatch</span><span style="color: #000000;">&#40;</span> userInputString, <span style="color: #808080;">&quot;\d+(\.?\d+)&quot;</span> <span style="color: #000000;">&#41;</span> <span style="color: #FF8000;">Then</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">2</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">    <span style="color: #008080; font-style: italic;">' perform some conversion and math operations here</span></pre></td></tr><tr><td class="devcodelines" width="1%">3</td><td class="devcodelinesarea"><pre class="devcode devcodeline"><span style="color: #0600FF;">End</span> <span style="color: #0600FF;">If</span> </pre></td></tr></table></div></pre>
<br /><br /><strong>String Replace using regular expressions - VB.net</strong><br /><br /><pre class="devcodeblock" title="vb.net"><table class="devcodetools"><tbody><tr><td>&nbsp;vb.net&nbsp;|&nbsp;</td><td style="background-image:url('http://dushi.co.uk/wp-content/plugins/devformatter/img/devformatter-copy.png');background-repeat:no-repeat;background-position:50% 50%;width:16px;height:16px;"/><embed id="ZeroClipboard6" src="http://dushi.co.uk/wp-content/plugins/devformatter/_zclipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16px" height="16px" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=6&width=16&height=16" wmode="transparent" /></td><td>&nbsp;copy&nbsp;code&nbsp;|</td><td style="cursor:pointer" title="DevFormatter Plugin" onclick="devfmt_credits()">?</td><td width="99%">&nbsp;</td></tr></tbody></table><div class="devcodeoverflow"><table class="devcodearea" width="100%"><tr><td class="devcodelines" width="1%">01</td><td class="devcodelinesarea"><pre class="devcode devcodeline">                    <span style="color: #0600FF;">Try</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">02</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">                        <span style="color: #008080; font-style: italic;">'regularExpression_Replace -&gt; regular expression pattern to replace</span></pre></td></tr><tr><td class="devcodelines" width="1%">03</td><td class="devcodelinesarea"><pre class="devcode devcodeline">                        <span style="color: #0600FF;">Dim</span> regularExpression_Replace <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">New</span> Regex<span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;(.*)REGULAR EXPRESSION REPLACE PATTERN(.*)&quot;</span><span style="color: #000000;">&#41;</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">04</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">                        <span style="color: #008080; font-style: italic;">'txtInput.txt -&gt; Text to macth and replace against </span></pre></td></tr><tr><td class="devcodelines" width="1%">05</td><td class="devcodelinesarea"><pre class="devcode devcodeline">                        <span style="color: #0600FF;">Dim</span> txtReplacementPattern <span style="color: #FF8000;">As</span> <span style="color: #FF8000;">String</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">06</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">                        txtReplacementPattern <span style="color: #008000;">=</span> <span style="color: #808080;">&quot;THIS WILL BE MY REPLACED TEXT&quot;</span></pre></td></tr><tr><td class="devcodelines" width="1%">07</td><td class="devcodelinesarea"><pre class="devcode devcodeline">                        <span style="color: #008080; font-style: italic;">'txtReplacementPattern = &quot;$ &quot;</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">08</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">                        txtInput.<span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> regularExpression_Replace.<span style="color: #0600FF;">Replace</span><span style="color: #000000;">&#40;</span>txtInput.<span style="color: #0000FF;">Text</span>, _</pre></td></tr><tr><td class="devcodelines" width="1%">09</td><td class="devcodelinesarea"><pre class="devcode devcodeline">                            txtReplacementPattern<span style="color: #000000;">&#41;</span></pre></td></tr><tr><td class="devcodelines devcodelinesodd" width="1%">10</td><td class="devcodelinesarea devcodelinesareaodd"><pre class="devcode devcodeline">                    <span style="color: #0600FF;">Catch</span> ex <span style="color: #FF8000;">As</span> Exception</pre></td></tr><tr><td class="devcodelines" width="1%">11</td><td class="devcodelinesarea"><pre class="devcode devcodeline">                        Mess</pre></td></tr></table></div></pre>
<br /><br /><a href="http://msdn.microsoft.com/en-us/library/ms972966.aspx" target="_blank">Regular Expressions in ASP.NET</a><br /><br />]]></content:encoded>
			<wfw:commentRss>http://dushi.co.uk/20/07/2009/net-regular-expressions-string-match-replace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
