title: Is it possible to create a new T-SQL Operator using CLR Code in SQL Server?
body: <p>I have a very simple CLR Function for doing Regex Matching</p>
  
  <pre><code>public static SqlBoolean RegExMatch(SqlString input, SqlString pattern)
  {
      if (input.IsNull || pattern.IsNull)
          return SqlBoolean.False;
  
      return Regex.IsMatch(input.Value, pattern.Value, RegexOptions.IgnoreCase);
  }
  </code></pre>
  
  <p>It allows me to write a SQL Statement Like.</p>
  
  <pre><code>SELECT * FROM dbo.table1 WHERE dbo.RegexMatch(column1, '[0-9][A-Z]') = 1
  -- match entries in col1 like 1A, 2B etc...
  </code></pre>
  
  <p>I'm just thinking it would be nice to reformulate that query so it could be called like</p>
  
  <pre><code>SELECT * FROM dbo.table1 WHERE column1 REGEXLIKE '[0-9][A-Z]'
  </code></pre>
  
  <p>Is it possible to create new comparison operators using CLR Code. (I'm guessing from my brief glance around the web that the answer is <strong><em>NO</em></strong>, but no harm asking)</p>