Lookahead for end of regex

This prevents the division sign (/) from being interpreted as a
regex incorrectly.

Closes #41