Skip to content

ydah/hoozuki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hoozuki (鬼灯) Gem Version CI

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

Installation

gem install hoozuki

Usage

require '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')    # => false

If 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')    # => false

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A hobby regex engine written in Ruby. Designed to be simple and efficient for educational purposes.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors