Question: In this example I just want to remove the word "a" not letter a in all words but regex doesn't seem to work. 

```
var str = "A brown fox always jumps over the orange apple in a weird way"; 
var res = str.replace(/a/g, "");

```

//result is brown fox lwys jumps over the ornge pple in a weird wy
 //but i'd just like brown fox always jumps over the orange apple in weird way

I guess I could look for the index of the word a and cut it out but is there a faster way?

Answer: 
Use `\b` to check for word boundaries. Also use `i` switch to make case insensitive match.

Try 

```js
var str = "A brown fox always jumps over the orange apple in a weird way"; 
console.log(str.replace(/\ba\b/ig, "").trim());
```
```
var res = (str.charAt(0));

```

With this, you select the first character of the string. Is that what you want ?