Add some regex tests and documentation