A hobby regex engine written in Ruby. Designed to be simple and efficient for educational purposes. Currently supports 2 engines:
- DFA Based Engine
- VM Based Engine
gem install hoozukirequire 'hoozuki'
regex = Hoozuki.new('a(bc|de)*f') # Or Hoozuki.new('a(bc|de)*f', engine: :nfa) for NFA based engine
regex.match?('abcdef') # => true
regex.match?('adef') # => true
regex.match?('xyz') # => falseIf you want to use the VM based engine:
require 'hoozuki'
regex = Hoozuki.new('a(bc|de)*f', engine: :vm)
regex.match?('abcdef') # => true
regex.match?('adef') # => true
regex.match?('xyz') # => falseThis project is licensed under the MIT License. See the LICENSE file for details.