title: sql patern match to find a space or character
body: <p>I am working in SQL Server 2008 R2. I am creating a query to look for a specific set of characters, such as 'ACS' but I don't want to return results that contain 'Non ACS' or 'Non-ACS' (Why the person(s) who entered the data couldn't be consistent is beyond me). I am wanting to use a regex to keep the query short. What I have tried is:</p>
  
  <pre><code>WHERE ((tblTasks.strTask LIKE '%ACS%' COLLATE Latin1_General_CS_AS) AND (tblTasks.strTask NOT LIKE '%NON[-, ]ACS%' COLLATE Latin1_General_CS_AS))
  </code></pre>
  
  <p>which doesn't work.</p>
  
  <p>I am trying to avoid the following WHERE clause:</p>
  
  <pre><code>WHERE ((tblTasks.strTask LIKE '%ACS%' COLLATE Latin1_General_CS_AS) AND ((tblTasks.strTask NOT LIKE '%NON-ACS%' COLLATE Latin1_General_CS_AS) AND (tblTasks.strTask NOT LIKE '%NON ACS%' COLLATE Latin1_General_CS_AS)))
  </code></pre>
  
  <p>How does one find either the space or the dash between the two words/character sets?</p>
  
  <p>And if I could do something like this that would be cool:</p>
  
  <pre><code>WHERE (tblTasks.strTask LIKE '%^[NON]^[-, ]ACS%' COLLATE Latin1_General_CS_AS)
  </code></pre>