ExcExp is an ambitious attempt at constructing a regular expression DSL. Unfortunately, most regular expressions are write-only. This project aims to fix that.
Add this line to your application's Gemfile:
gem 'exc_exp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install exc_exp
A sample usage would be as follows:
exc_exp = ExcExp.build do
any_number { matching 'ExcExp' }
end
"ExcExp".match exc_exp.to_regex #=> #<MatchData "ExcExp">
exc_exp.match "ExcExp" #=> #<MatchData "ExcExp">
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request