Merge with pull request of jacobrobertson for regex support