Question: so i have a `<div>` that has 3 classes `<div class='a b c'>` and another `<div>` with 2 classes `<div class='a b'>` how can i select all the `<div>` that have classes A and B and not C.

Is this possible with JQuery?

Answer: 
You can use selector like this `$('div.a.b:not(.c)')`

1. `div.a.b` selects all `div` elements that have both classes `a` and `b`
2. `:not(.c)` but won't select `div` element with class `c`

```js
$('div.a.b:not(.c)').css('color', 'red')
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class='a b c'>Div</div>
<div class='a b'>Div</div>
```
You can use the :not selector in jQuery, documentation [here](https://api.jquery.com/not-selector/)

So your query would be :

```
$('.a.b:not(.c)')

```

JSFiddle : <https://jsfiddle.net/rs4b4gv5/>

-- EDIT --
Typo fixed ! .. should be ok now.

```js
alert($(".a.b:not(.c)").text());
```

```html
<script src="https://code.jquery.com/jquery-3.2.1.js"></script>
<div class="a b c">with all 3</div>
<div class="a b">only 2</div>
```