<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://jaysonknight.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx</link><description>I posted earlier about a troublesome piece of code I came across that parses a string to see if it’s numeric. Phil came back with an interesting reply with his take on it; I’m the first to admit that perhaps I worded my worries a little too strongly in</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Debug Build: 40407.4157)</generator><item><title>Best of JaysonKnight.com -- Happy New Year!</title><link>http://jaysonknight.com/blog/pages/1756.aspx#5805</link><pubDate>Fri, 30 Dec 2005 09:38:37 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:5805</guid><dc:creator>protected virtual void jaysonBlog {</dc:creator><description>One thing that really bugs me about blogs is that it&amp;amp;amp;rsquo;s still really damn hard to find specific...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=5805" width="1" height="1"&gt;</description></item><item><title>New MSDN Magazine Column -- CLR Inside Out</title><link>http://jaysonknight.com/blog/pages/1756.aspx#5448</link><pubDate>Wed, 14 Dec 2005 15:17:27 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:5448</guid><dc:creator>protected virtual void jaysonBlog {</dc:creator><description>I just received this month&amp;amp;amp;rsquo;s MSDN magazine&amp;amp;amp;nbsp;in the mail and was thrilled to see a new column...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=5448" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1803</link><pubDate>Fri, 02 Sep 2005 07:55:31 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1803</guid><dc:creator>David Voss</dc:creator><description>A related discussion found here:  IsNumeric in C#, WHY NOT?  &lt;a rel="nofollow" target="_new" href="http://dotnet.org.za/deonvs/archive/2004/07/06/2579.aspx"&gt;http://dotnet.org.za/deonvs/archive/2004/07/06/2579.aspx&lt;/a&gt;   &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1803" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1800</link><pubDate>Thu, 01 Sep 2005 06:01:22 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1800</guid><dc:creator>David Voss</dc:creator><description>That is interesting.  Along the same lines, what about checking if a value is a valid date?  Currently there isn't a TryParse method for DateTime, only Parse().  &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1800" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1772</link><pubDate>Sat, 20 Aug 2005 07:16:10 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1772</guid><dc:creator>Jayson Knight</dc:creator><description>@Aaron  I agree with you 100% actually, but that wasn't the point of this article.  I was trying to do a high level comparison of the different options available along with the pluses/minuses to each.  In reality, all data should be validated on the client first (and further scrubbed at the data access layer), thus negating the need for any of the mechanisms I mentioned in this post.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1772" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1771</link><pubDate>Sat, 20 Aug 2005 07:14:04 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1771</guid><dc:creator>Jayson Knight</dc:creator><description>@EvilMe  I'll do a post on this shortly as I&amp;quot;m in the same boat as you are.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1771" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1770</link><pubDate>Sat, 20 Aug 2005 02:40:58 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1770</guid><dc:creator>Aaron Robinson</dc:creator><description>Your method of replacing periods and commas stinks for negative numbers and bogus user-entered values like &amp;quot;1.23.4,6.50&amp;quot;...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1770" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1763</link><pubDate>Wed, 17 Aug 2005 03:04:38 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1763</guid><dc:creator>evilme</dc:creator><description>er, what i mean to ask is i can always find long boring technical specs, but i'm looking more for like, someone's delicious tags for the most interesting new features/&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1763" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1762</link><pubDate>Tue, 16 Aug 2005 03:01:18 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1762</guid><dc:creator>evilmousse</dc:creator><description>i'm the regex folks eh? ok.. thanks for the scoop, the results sound about right. regex, being a multi-use object, likely couldn't be more efficient than customized char iteration until the task at hand reaches a certain level of complexity. i doubt ssn's would be complex enough, but scraping a webpage for info would be. at that point tho, the issue is developer stress--i wouldn't want to parse a whole variable webpage one char at a time even if it IS more efficient...  where can i find more info on tryParse and anything else 'new' in v2 of the cli?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1762" width="1" height="1"&gt;</description></item><item><title>re: Parsing a String to See if it's Numeric -- Parse vs TryParse vs Char Array Data vs Regular Expressions</title><link>http://jaysonknight.com/blog/pages/1756.aspx#1761</link><pubDate>Mon, 15 Aug 2005 19:47:35 GMT</pubDate><guid isPermaLink="false">68946f8a-ff84-48ba-8722-56d2a9e13499:1761</guid><dc:creator>Jayson Knight</dc:creator><description>@Jeff  For some reason I didn't zip up the source for the application in the link I provided (remedied)...whoops!  I modified the source per your recomendations (moved the regex to a member var and initialized it in the RunButton_Click event) and the regex results were still roughly the same.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://jaysonknight.com/aggbug.aspx?PostID=1761" width="1" height="1"&gt;</description></item></channel></rss>