<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/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>Farhan Uddin Khan - All Comments</title><link>http://weblogs.asp.net/farhank/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug Build: 20510.895)</generator><item><title>re: Creating CLR SQL User Defined Function to Validate Values Using Regular Expression.</title><link>http://weblogs.asp.net/farhank/archive/2008/07/04/creating-clr-sql-user-defined-function-to-validate-values-using-regular-expression.aspx#6357954</link><pubDate>Fri, 04 Jul 2008 13:02:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6357954</guid><dc:creator>Richard</dc:creator><description>&lt;p&gt;You can simplify your function by replacing:&lt;/p&gt;
&lt;p&gt;Regex ObjRegx = new Regex((string) pattern);&lt;/p&gt;
&lt;p&gt;Match ObjMatch = ObjRegx.Match((string) value);&lt;/p&gt;
&lt;p&gt;return (SqlBoolean)ObjMatch.Success;&lt;/p&gt;
&lt;p&gt;with:&lt;/p&gt;
&lt;p&gt;return (SqlBoolean)Regex.IsMatch((string)value, (string)pattern);&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6357954" width="1" height="1"&gt;</description></item></channel></rss>