Of course you can inspect it: open the source code you wrote and read it. Also, don't write the code you don't want to be executed?
> but it's often much easier to ask a regex library to run an interpreter over a string describing the pattern to match.
Which, I might notice, you never inspect. You execute it blindly and look at the outputs of the match() method falling out of it. In fact, most regex libraries compile your regex into an opaque data structure which you can't inspect — and nobody complain about it.