Fix #540. Add a test to make sure regex matching with literal dot work