Initial implementation of regex, fix Issue #108.