Question: I'm trying to add a char in front of another certain char unless its already preceded by the char I'm trying to inject. This works fine (insert an n before any Z unless it already has an n before it):

```
s/([^n])Z/$1nZ/g;

```

except on word boundaries preceded by nothing. So to fix that I tried:

```
s/([\b^n])Z/$1nZ/g; # does not work

s/(\b|[^n])Z/$1nZ/g; # does work

```

Why didn't #1 work? Seems legit?

Answer: 
Two problems with `[\b^n]`:

* `^` only negates the character class if it's the first character.
* `[...]` matches a character, but you're trying to match something other than a character. In there, `\b` there represents character `08` (backspace).
Thanks guys- never knew that ^ was different in position 1, in a CC. 

I move it around outside of a CC (to tag a beginning) and it works as expected. I guess I see why they did it (so you can use ^ within [] to indicate caret not negation). But it seems like escaping it would have had the same effect. Sometimes I wonder what Larry was thinking but I don't see him anymore since our company cut OSCON travel...

Much appreciated...