Rob Pike's simple C regex matcher in Go

Translating Rob Pike's simple and elegant C regex matcher to Go.