Implemented basic regex matching for ruby.