Implement crude support for regular expressions.