Onibi is a simple implementation of regular expression engine written in Ruby.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
Guardfile
LICENSE.txt
README.md
Rakefile

README.md

Onibi

Onibi is an implementation of regular expression engine written in Ruby.

Usage

regexp = Onibi.new("namu(syaka)?")
regexp.match?("namusyaka") #=> true
regexp.match?("namu") #=> true
regexp.match?("namusya") #=> false

Syntax

Syntax Description
* Matches the preceding element zero or more times.
+ Matches the preceding element one or more times.
? Matches the preceding element zero or one time.
() Defines a subexpr.
[] The bracket expression.
| The union operator matches either the expression before or the expression after the operator.

Reference

Contributing

  1. Fork it ( https://github.com/namusyaka/onibi/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request