Regular Expression Help

How come ~[^a-zA-Z0-9]~ will search for anything that doesn’t match and ~[a-zA-Z0-9]~ will search for everything that does match?

I don’t see how adding the start of a line character (^) achieves this.

Thanks!

In square brackets the ^ character acts as logical not.

Thanks :slight_smile: